Guest User

Guest User

  • Tech Writer
  • 357
  • 120.8k

Microsoft .NET libraries write directly to fields instead of using properties?

Aug 20 2012 12:20 PM
Hi

I am analysing the V4 .NET framework using Reflector and have noticed that a good majority of fields are written to directly rather than using properties to set\write, for example:-

Public Lazy(LazyThreadSafeMode mode)

this.m_threadSafeObj = Lazy<T>.GetObjectFromMode(mode);

m_threadSafeObj is a field but I wondered why a property wasnt used instead?

Regards

Steven

Answers (2)