Why is (or isn't) setting fields in a constructor thread-safe?
Let's say you have a simple class like this: class MyClass { private readonly int a; private int b; public MyClass(int a, int b) { this.a = a; this.b = b; } public int A { get { return a; } } public int B { get { return b; } } } I could use this class in a multi-threaded manner: MyClass value = null; Task.Run(() => { while (true) { value = new MyClass(1, 1); Thread.Sleep(10); } }); while (true) { MyClass result = value; if (result != null && (result.A != 1 || result.B != 1)) { throw new Exception(); } Thread.Sleep(10); } My question is: will I ever see this (or other similar multi-threaded