Private Constructor and Singleton design pattern
public class Singleton
{
static readonly Singleton instance = new Singleton();
static Singleton() //Private Constructor to make sure it cannot be instantiated out of the class bounds.
{
}
public static Singleton Instance
{
get { return instance}
}
}
浙公网安备 33010602011771号