Talk:C Sharp Programming/Design Patterns

Singleton
Shouldn't  be declared as   ? 208.86.238.129 (talk) 20:04, 15 April 2009 (UTC)


 * Yes. What is ironic is that the singleton pattern page has the correct code. --Buttink (talk) 21:02, 21 June 2009 (UTC)

Shouldn't the singleton be initialized on first access? If you have an object that consumes vast amounts of memory, you don't want to initialize it unnecessarily, hence why the first example was

This way if it is not used, it is not initialized. The example provided in the article initializes it regardless.