add ISafeSerializationData
[mcs.git] / tests / test-anon-27.cs
blob3bfaef3e804e6f1785d8bd2cef7782d88cbf38a3
1 using System;
3 delegate void D ();
5 class X {
7 static int Main ()
9 X x = new X();
10 x.M (10);
11 e ();
12 Console.WriteLine ("J should be 11= {0}", j);
13 e ();
14 Console.WriteLine ("J should be 11= {0}", j);
15 x.M (100);
16 e ();
17 Console.WriteLine ("J should be 101= {0}", j);
18 if (j != 101)
19 return 3;
20 Console.WriteLine ("OK");
21 return 0;
24 static int j;
25 static D e;
27 void M (int a)
29 Console.WriteLine ("A is=" + a);
30 D d = delegate {
31 int b;
32 b = 1;
33 e = delegate {
34 Console.WriteLine ("IN NESTED DELEGATE: {0}", a);
35 j = a + b;
38 d ();