首页 > Web开发 > 详细

Parallel for-each loops in .NET C# z

时间:2014-05-22 16:00:54      阅读:356      评论:0      收藏:0      [点我收藏+]
  • An IEnumerable object
  • An Action of T which is used to process each item in the list
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

Parallel for-each loops in .NET C# z

原文:http://www.cnblogs.com/zeroone/p/3744048.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!