"disable_omit_fp" can now be included in MONO_DEBUG
[mono-project.git] / mcs / tests / gtest-anontype-03.cs
blob030c110f11a229efc20a72d0cd138b964e19deec
2 // Tests anonymous types initialized with object members
3 using System;
4 using System.Collections;
6 public class MyClass
8 public string Foo = "Bar";
9 public int Baz {
10 get { return 42; }
14 public class Test
16 public static int Main ()
18 MyClass mc = new MyClass();
19 var v = new { mc.Foo, mc.Baz };
21 if (v.Foo != "Bar")
22 return 1;
23 if (v.Baz != 42)
24 return 2;
26 return 0;