public ControlCenter() { if (mySocket == null) { lock (_lock) { mySocket = MySocket.GetInstance(); mySocket.coreProccessing += dataProccess; } } }
public static MySocket GetInstance() { if (instance == null) { lock (_lock) { if (instance == null) { instance = new MySocket(); } } } return instance; }
public static MySocket GetInstance() { if (instance == null) { lock (_lock) { if (instance == null) { instance = new MySocket(); } } } return(instance); }