.net c# lazy loading code pattern

Making use of lazy initialization in .Net 4 and above

One of the most lesser known, yet very cool, additions to .Net 4.5 is the generic Lazy<T> class. It allows you to defer the initialization of a type until it’s needed. What is it? Lazy<T> is a generic class introduce in .Net 4.5 which acts as factory for the wrapped object constructing it only once .Value is […]

0 Comment