[mono-api-html] Add solution.
[mono.git] / mcs / tests / gtest-iter-30.cs
1 using System;
2 using System.Collections.Generic;
3
4 public class Program
5 {
6         public static void Main ()
7         {
8                 foreach (var x in new M ().Test ()) {
9                         Console.WriteLine (x);
10                 }
11         }
12 }
13
14 class M
15 {
16         public IEnumerable<int> Test ()
17         {
18                 Action a = delegate {
19                         int k = 0;
20                         Action x = delegate {
21                                 Console.WriteLine (this);
22                                 Console.WriteLine (k);
23                         };
24
25                         x ();
26                         Console.WriteLine (this);
27                 };
28
29                 a ();
30                 
31                 yield return 1;
32         }
33 }