in System.Collections.Generic:
[mcs.git] / tests / test-anon-81.cs
blobfbd065d096bf27b05af8db0df448470e23eae62a
1 using System;
3 class C
5 public static int Main ()
7 if (new C ().Test () != 6)
8 return 1;
10 return 0;
13 public delegate void Cmd ();
14 public delegate int Cmd2 ();
16 int Test ()
18 int r = Foo2 (delegate () {
19 int x = 4;
20 Foo (delegate () {
21 int y = 6;
22 Foo (delegate () {
23 x = y;
24 });
25 });
26 return x;
27 });
29 Console.WriteLine (r);
30 return r;
33 int Foo2 (Cmd2 cmd)
35 return cmd ();
38 void Foo (Cmd cmd)
40 cmd ();