1 // Compiler options: -langversion:linq
2 // Tests variable type inference with the var keyword when assigning to user-defined types
11 public int Property
= 16;
22 public int Property
= 42;
26 var class1
= new Class1 ();
28 if (class1
.GetType () != typeof (Class1
))
30 if (!class1
.Method ())
32 if (class1
.Property
!= 16)
35 var class2
= new Class2();
37 if (class2
.GetType () != typeof (Class2
))
39 if (!class2
.Method ())
41 if (class2
.Property
!= 42)