Singleton is using when you need a class that has only one instance, and you need to provide a global point of access to the instance. As you can notice, singleton is similar to the global variable. And as the global variable it can violates testability and scalability of your system. So you should use it carefully or not to use at all if you can. But if you need it, you can use this 'lazy' implementation. ('Lazy' means that the instantiation is not performed until an object asks for an instance, whereas global variables always consume resources when the application starts):
using System; public class Singleton { private static Singleton instance; private Singleton() {} public static Singleton Instance { get { if (instance == null) { instance = new Singleton(); } return instance; } } }