Пример #1
0
        static void Main(string[] args)
        {
            Singleton singleton1 = Singleton.Instance();
            Singleton singleton2 = Singleton.Instance();

            singleton1.HelloThere("Songoku");
            singleton2.HelloThere("Doraemon");
            Console.WriteLine(Singleton.GetTotalInstances());
        }