2
Answers

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

Ask a question
S

S

12y
1k
1
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)