1 // Compiler options: -langversion:future
9 public int this [int i
] {
10 set { Console.WriteLine ("set= " + i); id = value; }
11 get { Console.WriteLine ("get= " + i); return id; }
17 public MyPoint (int x
, int y
)
28 static decimal Foo (decimal t
, decimal a
)
33 static string Bar (int a
= 1, string s
= "2", char c
= '3')
35 return a
.ToString () + s
+ c
;
38 static int Test (int a
, int b
)
40 Console
.WriteLine ("{0} {1}", a
, b
);
44 public static int Main ()
47 if (Foo (a
: h
= 9, t
: 3) != 9)
53 if (Bar (a
: 1, s
: "x", c
: '2') != "1x2")
56 if (Bar (s
: "x") != "1x3")
60 if (Test (a
: i
++, b
: i
++) != 17)
67 if (Test (b
: i
++, a
: i
++) != 13)
80 MyPoint mp
= new MyPoint (y
: -1, x
: 5);
84 Console
.WriteLine ("ok");