public static void RemoveInstance() { if (instance != null) { instance = null; } }
public static T Instance() { if (instance == null) { lock (typeof(T)) { if (instance == null) { instance = Activator.CreateInstance(typeof(T), true) as T; } } } return((T)instance); }