summaryrefslogtreecommitdiff
path: root/mcs/errors/cs1650.cs
blob: 04d1897394370e151878c11de90b6aba19d50600 (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: 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);
	}
}