static void Main(string[] args)
        {
            TaskFactory taskFactory = new TaskFactory();
            List <Task> taskList    = new List <Task>();

            for (int i = 0; i < 5; i++)
            {
                taskList.Add(taskFactory.StartNew(() =>
                {
                    Singleton singleton = Singleton.getInstance();
                }));
            }
            Console.ReadKey();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Singleton single = Singleton.getInstance();

            single.say();
        }