结果已经写在注释中staticvoidMain(string[]args){varconcurrentDictionary=newConcurrentDictionary<int,string>();vardictionary=newDictionary<int,string>();varsw=newStopwatch();sw.Start();for(inti=0;i<1000000;i++){lock(dictionary){dictionary[i]=Item;}}sw.Stop();Console.WriteLine("wrintingtodictionar...
继续阅读 >