Thursday, June 3, 2010

What is System.Lazy<T>

there is a new class in .Net framework 4.0 Called Lazy<T> that provides lazy initialization. Lazy initialization occurs the first time the Lazy<T>.Value property is accessed or the Lazy<T>.ToString method is called and the return value will be cached, it means the second time you access its value, the expression or function does not get executed.