Lazy initialization in .NET 4

前端 未结 3 1004
我寻月下人不归
我寻月下人不归 2021-01-31 17:29

What is lazy initialization. here is the code i got after search google.

class MessageClass
{
    public string Message { get; set; }

    public MessageClass(st         


        
3条回答
  •  鱼传尺愫
    2021-01-31 18:12

    Check out msdn documentation over here : Lazy Initialization

    Lazy initialization of an object means that its creation is deferred until it is first used. Lazy initialization is primarily used to improve performance, avoid wasteful computation, and reduce program memory requirements.

提交回复
热议问题