Singleton :
The Singleton implementation is based on creating a class using a method (or property in .NET) that instantiates this class if it does not already exist. The class constructor must be private to prevent other initialization methods. Also, Singleton should be carefully used in multi-threaded applications, because at the same time, two threads can create two different instances (which violates the singleton pattern).
More information and examples can be found here.
source
share