Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cs1612-3.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dc80a2f88a04001e2527e5765f63eceebf93dc6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// cs1612-3.cs: Cannot modify the return value of `bar.this[...]' because it is not a variable
// Line: 19

struct foo {
	public int x;
}

class bar {
	public foo this [int x] {
		get { return new foo (); }
		set { }
	}
}

class main {
	static void Main ()
	{
		bar b = new bar ();
		b [0].x = 5;
	}
}