Simple Singleton Pattern in C#





0/5 (0 vote)
You should do it like this:public sealed class MySingleton { public static readonly MySingleton SharedInstance = new MySingleton (); private MySingleton () : base() { }}
You should do it like this:
public sealed class MySingleton
{
public static readonly MySingleton SharedInstance = new MySingleton ();
private MySingleton () : base()
{
}
}