for (int i = 1; i < 100; i++) {
int z = i; ThreadPool.QueueUserWorkItem((o) => { Thread.Sleep(1000); Console.Write(z.ToString()); Console.Write(Environment.NewLine); }); }
for (int i = 1; i < 100; i++) {
ThreadPool.QueueUserWorkItem((o) => {
int z = i; Thread.Sleep(1000); Console.Write(z.ToString()); Console.Write(Environment.NewLine); });
这两段代码有什么区别???? }