Parallel for-each loops in .NET C# z

2020-12-13 06:11

阅读:396

标签:style   blog   class   c   code   java   

  • An IEnumerable object
  • An Action of T which is used to process each item in the list
soscw.com,搜素材
Liststring> dataList = new Liststring> 
{
         "this", "is", "random", "sentence", "hello", "goodbye"
};
 
Parallel.ForEach(dataList, item =>
{
    Console.WriteLine("Item {0} has {1} characters",
        item, item.Length);
});
soscw.com,搜素材

 

Parallel for-each loops in .NET C# z,搜素材,soscw.com

Parallel for-each loops in .NET C# z

标签:style   blog   class   c   code   java   

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


评论


亲,登录后才可以留言!