A readonly object is equivalent to intialization without readonly . The main difference is that IL metadata will have the init initly bit set in the field.
Nitpick: both of your using and lock extensions are incorrect in a subtle way.
The lock version is incorrect, because its extension depends on the version of the CLR and C # compiler you are using. The C # 4.0 compiler in combination with version 4.0 uses the Enter(object, ref bool) template instead of the simple Enter(object)
The using version is subtly incorrect because it looks a little closer to this in the finally block
if (disposable != null) { ((IDisposable)disposable).Dispose(); }
source share