Switch to compiler-tester
[mono.git] / mcs / tests / test-anon-16.cs
1 //
2 // Instance access.
3 //
4 using System;
5
6 delegate void D ();
7
8 class X {
9         static void Main ()
10         {
11                 X x = new X (1);
12                 X y = new X (100);
13                 D a = x.T ();
14                 D b = y.T ();
15
16                 a ();
17                 b ();
18         }
19
20         X (int start)
21         {
22                 ins = start;
23         }
24
25         int ins;
26
27         D T ()
28         {
29                 D d = delegate () {
30                         Console.WriteLine ("My state is: " + ins);
31                 };
32
33                 return d;
34         }
35 }