“Sorteren op thread (bèta)” (Sort by thread (beta))
[ source ]
The C# For-loop in Parallel computing looks easy. Something I will need to keep in mind when doing calculations.
Here is an example in .NET 4.0:
using System;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Parallel.For(0, 2500,
delegate(int i)
{
// Do some work here
Console.WriteLine(i);
}
);
Console.ReadLine();
}
}
}
More information about Parallel computing in C#:
Have fun!