1

I'm implementing a framework and want to create a lazy load initialization for one of my classes.

how to do this ?

Nasser Hadjloo
  • 12,312
  • 15
  • 69
  • 100
  • Please clarify what you mean by "lazy load initialization". Do you mean to lazily construct the object, or do you mean to load the code for the object (i.e. loading it up from a different DLL/assembly) at runtime? I've usually seen lazy initialization as the first, but you said "lazy LOAD initialization", which is confusing. – Merlyn Morgan-Graham Feb 22 '10 at 08:21
  • Related: http://blog.ploeh.dk/2010/01/20/RebuttalConstructorOverinjectionAntipattern.aspx – Mark Seemann Feb 22 '10 at 08:34
  • Check [this question](http://stackoverflow.com/questions/978759/what-is-lazy-initialization-c-net). – Gerrie Schenck Feb 22 '10 at 08:09

1 Answers1

4

The new .NET 4 class Lazy may help.

Arve
  • 7,284
  • 5
  • 37
  • 41