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

cs1918.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b1f325420156192360dd2b3e8513015a706284fe (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; get;
	}

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