Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-iter-21.cs
1 using System;
2 using System.Collections.Generic;
3
4 class C
5 {
6         IEnumerable<int> Test ()
7         {
8                 Console.WriteLine ("init");
9                 try {
10                         yield return 1;
11                 } finally {
12                         int oo = 4;
13                         Action a = () => Console.WriteLine (oo);
14                 }
15                 
16                 yield return 2;
17         }
18
19         public static int Main ()
20         {
21                 var c = new C ();
22                 foreach (var a in c.Test ())
23                 {
24                 }
25                 
26                 return 0;
27         }
28 }