2 // This test exercises the various ways in which mutator operators can be
3 // used in C# and the various different scenarios that the compiler would
6 // variables, linear arrays, multi-dimensional arrays, jagged arrays,
7 // properties, indexers and overloaded ++ and --
15 public int this [int n] {
50 static public Z operator ++ (Z v)
59 static int p_pre_increment (X x)
64 static int p_post_increment (X x)
69 static int i_pre_increment (X x)
74 static int i_post_increment (X x)
79 static Z overload_increment (Z z)
84 static Z overload_pre_increment (Z z)
95 // Tests the ++ and -- operators on integers
97 static int simple (int i)
114 if ((c = simple (10)) != 0)
117 if (i_pre_increment (x) != 1)
123 if (i_post_increment (x) != 1)
129 if (p_pre_increment (x) != 1)
135 if (p_post_increment (x) != 1)
143 overload_increment (z);