Inner Fields and Lazy Initialization in C#

added by dpeterson
11/1/2011 8:28:32 PM

286 Views

Steve Smith shows us how we can use lazy properties without inner fields and without the fear of accidentally causing a NullReferenceException by accessing the inner field directly from code.


1 comments

Noldorin
11/2/2011 10:39:13 PM
This is a nice example of a practical use of Lazy<T>. I personally haven't felt the need for it, though I've always understood the theory. This may just encourage me this little bit more.