Make StringComparer.Create throw ArgumentNullException (#26570)
[mono-project.git] / mcs / tests / gtest-initialize-10.cs
blobe4810d3277637144d0322f1edc841830890ce6a7
1 using System;
3 class Foo
5 public int P { get; set; }
8 class Y
10 public static int Main ()
12 Foo foo = new Foo ();
13 foo.P = 1;
15 if (!Do (foo))
16 return 1;
18 Console.WriteLine ("OK");
19 return 0;
22 static bool Do (Foo f)
24 f = new Foo () {
25 P = f.P
28 if (f.P != 1)
29 return false;
31 Foo f2 = new Foo ();
32 f2.P = 9;
33 f2 = new Foo () {
34 P = f2.P
37 if (f2.P != 9)
38 return false;
40 return true;