I want to increase the index by a specific value, for example 2:
for (int i = 0; i < 10; i+=2) { Console.WriteLine(i); }
How can I do the same with the Parallel
class, for example:
Parallel.For(0, 10, i => { Console.WriteLine(i); i += 2;
Edit
I would like the Parallel
loop to run only 5 operations (as sequential for) and the order does not matter to me.
oleksii
source share