Updated with review feedback.
[mono.git] / mcs / errors / cs1650-3.cs
1 // CS1650: Fields of static readonly field `C<T>.t' cannot be assigned to (except in a static constructor or a variable initializer)
2 // Line: 17
3
4 using System;
5
6 interface I
7 {
8         int X { get; set; }
9 }
10
11 class C<T> where T : struct, I
12 {
13         static readonly T t;
14
15         public static void Foo ()
16         {
17                 t.X = 42;
18         }
19 }