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

cs0191-2.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7a98166a4a669b508bd305adabf970dc50d0e81b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// cs0191-2.cs: A readonly field `Foo.i' cannot be assigned to (except in a constructor or a variable initializer)
// Line: 10 

class Foo {
	readonly int i;
	Foo () { }
	Foo (int i)
	{
		Foo x = new Foo ();
		x.i = i;
	}
	static void Main () { Foo y = new Foo (0); }
}