2009-07-16 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-anon-34.cs
blob090ab843c63d5530acb9c7b00c874c0b446d5e0f
1 using System;
3 public class MyClass
5 public string Foo = "Bar";
6 private int answer;
7 public int Answer {
8 get { return answer; }
9 set { answer = value; }
13 public class Test
15 delegate void D ();
17 static int Main ()
19 MyClass mc = null;
21 D d = delegate () {
22 mc = new MyClass() { Foo = "Baz", Answer = 42 };
25 d ();
27 if (mc.Foo != "Baz")
28 return 1;
30 if (mc.Answer != 42)
31 return 2;
33 return 0;