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

cs1650.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5755741683ac41e37c70a811b01c9b24f1a0bf6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// cs1650.cs: Fields of static readonly field 'C.s' cannot be assigned to (except in a static constructor or a variable initializer)
// Line: 14

using System;

struct S {
	public int x;
}

class C {
	static readonly S s;

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