(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / tests / 2test-a7.cs
blobecb5c5144581c496c7e7b8ae7ac4db329fb4809d
1 //
2 // Tests capturing of variables
3 //
4 delegate void S ();
5 using System;
7 class X {
8 static int Main ()
10 int a = 1;
11 if (a != 1)
12 return 1;
14 Console.WriteLine ("A is = " + a);
15 S b= delegate {
16 Console.WriteLine ("on delegate");
17 a = 2;
19 if (a != 1)
20 return 2;
21 b();
22 if (a != 2)
23 return 3;
24 Console.WriteLine ("OK");
25 return 0;