summaryrefslogtreecommitdiff
path: root/mcs/errors/cs1650-2.cs
blob: 9aa902d435d587859ee07cbdccfde94f03bf8b33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// CS1650: Fields of static readonly field `C.s' cannot be assigned to (except in a static constructor or a variable initializer)
// Line: 15

struct S
{
	public int x { get; set; }
}

class C
{
	static readonly S s;

	public static void Main (string[] args)
	{
		s.x = 42;
	}
}