List<string> dataList = new List<string> { "this", "is", "random", "sentence", "hello", "goodbye" }; Parallel.ForEach(dataList, item => { Console.WriteLine("Item {0} has {1} characters", item, item.Length); });
Parallel for-each loops in .NET C# z,布布扣,bubuko.com
Parallel for-each loops in .NET C# z
原文:http://www.cnblogs.com/zeroone/p/3744048.html