public static Singleton2 GetInstance() { if (instance == null) { lock (myLock) { if (instance == null) { instance = new Singleton2(); } } } return(instance); }
public static Singleton2 GetInstance() { if (instance == null) { lock (myLock) { if(instance==null) instance=new Singleton2(); } } return instance; }