public static SingletonPattern GetSingletonPattern() { if (singletonPattern == null) { singletonPattern = SingletonPattern.NewInstance(); } return(singletonPattern); }
static void Main(string[] args) { SingletonPattern singletonPattern = TestSingletonFactory.GetSingletonPattern(); Console.WriteLine(singletonPattern); singletonPattern.PrintValue(); Console.ReadLine(); GenericList genericList = new GenericList(); genericList.TestList(); Console.ReadLine(); }