Use Lazy Initialization to Delay Object Instantiation

Posted by: DotNetBips.com Latest Articles, on 22 Feb 2016 | View original | Bookmarked: 0 time(s)

It is a common practice to declare object variables as the class members and initialize them in the constructor of the class. At times, however, you need to delay the object instantiation until its first use. One way to achieve such an deferred object instantiation is to write custom code that implements Lazy Load pattern. An easy alternative is to use .NET framework's inbuilt lazy initialization feature. To that end this article explains the later approach....

Similar Posts

  • Use Lazy Initialization to Delay Object Instantiation more
  • Introducing Recurring Appointments for Web.UI Scheduler ASP.NET AJAX more
  • EF4: Lazy Loading on By Default but what about pre Beta 2 Models? more
  • Creating a Filtering User Interface With jQuery In a Web Forms Application: Part 1 more
  • Unit Testing - Do Repeat Yourself more
  • Querying a Multi-Tenant Data Architecture more
  • Chat room questions from the EF Tips & Tricks webcast more
  • A total n00bs guide to migrating from a custom data layer to Nhibernate: so many choices more
  • Silverlight 3 “toast” notifications more
  • The "Error creating window handle" exception and the Desktop Heap more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD