Parallel stepped for loops in .NET C# z

2020-12-13 06:11

阅读:377

标签:style   blog   class   c   code   java   

soscw.com,搜素材
for (int i = 0; i 20; i += 2)


public IEnumerableint> SteppedIntegerList(int startIndex,
            int endEndex, int stepSize)
{
        for (int i = startIndex; i  stepSize)
    {
        yield return i;
    }
}


Parallel.ForEach(SteppedIntegerList(0, 20, 2), index =>
{

    Console.WriteLine("Index value: {0}", index);
});
soscw.com,搜素材

 

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

Parallel stepped for loops in .NET C# z

标签:style   blog   class   c   code   java   

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


评论


亲,登录后才可以留言!