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

gcs1918.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 245d6bef89a99f165e462f28ddccd2653071497e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// CS1918: Members of value type `S' cannot be assigned using a property `C.Value' object initializer
// Line: 18


struct S
{
	public int X;
}

class C
{
	public S Value {
		set { }
	}

	static void Main ()
	{
		C c = new C { Value = { X = 2 } };
	}
}