2 using System.Reflection;
6 public string Property1 { get; }
8 public int Property2 { get; }
10 public static int Main ()
13 if (t.Property1 != null)
19 var fields = typeof (Test).GetFields(BindingFlags.NonPublic | BindingFlags.Instance);
20 if (fields.Length != 2)
23 foreach (var fi in fields) {
24 if ((fi.Attributes & FieldAttributes.InitOnly) == 0)