a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
31 lines
366 B
C#
31 lines
366 B
C#
using System;
|
|
|
|
class C
|
|
{
|
|
int value = 1;
|
|
|
|
public int this [int arg] {
|
|
get { return this.value; }
|
|
set { this.value = value + arg; }
|
|
}
|
|
|
|
public static int Main ()
|
|
{
|
|
C c = new C ();
|
|
dynamic d = c;
|
|
int index = 1;
|
|
|
|
var x = ++d[++index];
|
|
|
|
if (index != 2)
|
|
return 1;
|
|
|
|
if (c.value != 4)
|
|
return 2;
|
|
|
|
if (x != 2)
|
|
return 3;
|
|
|
|
return 0;
|
|
}
|
|
} |