2010-05-19 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-autoproperty-02.cs
bloba7b89ede74cd346e7e7b4031478ee6e4c630796c
2 // Tests static automatic properties
3 using System;
5 public class Test
7 private class A
9 public static string B { get; set; }
10 public static string C { get; private set; }
11 public static void DoThings ()
13 C = "C";
17 public static string Foo { get; set; }
18 public static int Answer { get; private set; }
20 static int Main ()
22 Foo = "Bar";
23 if (Foo != "Bar")
24 return 1;
26 Answer = 42;
27 if (Answer != 42)
28 return 2;
30 A.B = "B";
31 if (A.B != "B")
32 return 3;
34 A.DoThings();
35 if (A.C != "C")
36 return 4;
38 return 0;