コード例 #1
0
 static void TestSingleInstance()
 {
     Task[] taskArray = new Task[100];
     for (int i = 0; i < 100; i++)
     {
         taskArray[i] = Task.Factory.StartNew(() =>
         {
             SingleInstance.TestSingleInstance entity = SingleInstance.TestSingleInstance.Instance;
         });
     }
     Task.WaitAll(taskArray);
 }
コード例 #2
0
 static TestSingleInstance()
 {
     Console.WriteLine("Create Instance...");
     _Instance = new TestSingleInstance();
 }