Oh this is doing my head in! A few of these answers say in one breath that the static constructor is thread-safe, then in the next breath that it isn't! I don't understand. How can a static variable not be thread-safe?
Do you mean this?:
Thread 1 requires the static property, it gets created and the constructor commences, before it finishes, thread 2 comes along and asks for the static property. Thread 2 thens gets an incorrect result because the static constructor has not yet finished its work.
Is this what you guys mean? Is this the only scenario in which the static property is not thread-safe? In other words, once the constructor has finished, can every thread expect to get exactly the same result from the static property?
Thanks