无论如何增加 Parallel.For 启动后的循环次数?示例如下:
var start = 0;
var end = 5;
Parallel.For(start, end, i =>
{
Console.WriteLine(i);
end = 10;
});
感谢您的帮助。
周杰伦
最佳答案
不,end
变量(列为 toExclusive
in the documentation)在 lambda 范围内不可用。
关于C# 并行.For,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10711882/