2 // Tests anonymous types initialized with a mix of literals, local variables and object members
4 using System
.Collections
;
8 public string Foo
= "Bar";
16 public static int Main ()
18 string Hello
= "World";
19 MyClass mc
= new MyClass();
20 var v
= new { mc.Foo, mc.Baz, Hello, Answer = 42 }
;
26 if (v
.Hello
!= "World")