public new static DerivedSingleton Instance() { if (uniqueInstance == null) { uniqueInstance = new DerivedSingleton(); } return(uniqueInstance as DerivedSingleton); }
static void Main() { DerivedSingleton instance1 = DerivedSingleton.Instance(); DerivedSingleton instance2 = DerivedSingleton.Instance(); Console.WriteLine(ReferenceEquals(instance1, instance2)); // Delay. Console.ReadKey(); }