Parallel for-each loops in .NET C# z

时间:2014-05-22 16:01:17   收藏:0   阅读:290
bubuko.com,布布扣
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);
});
bubuko.com,布布扣

 

Parallel for-each loops in .NET C# z,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!