Switch to compiler-tester
[mono.git] / mcs / tests / test-anon-29.cs
1 using System;
2 using System.Collections;
3
4 public class X
5 {
6         string[] ABC = { "A", "B", "C" };
7         string [,] EFGH = { { "E", "F" }, { "G", "H"}};
8
9         delegate string Foo ();
10         delegate void Bar (string s);
11
12         public string Hello ()
13         {
14                 Foo foo = delegate {
15                         foreach (string s in ABC){
16                                 Bar bar = delegate (string t) {
17                                         Console.WriteLine (t);
18                                 };
19                                 bar (s);
20                         }
21
22                         foreach (string s in EFGH){
23                                 Bar bar = delegate (string t) {
24                                         Console.WriteLine (t);
25                                 };
26                                 bar (s);
27                         }
28
29                         return "Hello";
30                 };
31                 return foo ();
32         }
33
34         public static void Main ()
35         {
36                 X x = new X ();
37                 Console.WriteLine (x.Hello ());
38         }
39 }