I recently used a Parallel.For
loop (see code below) in a small C# program and I'm a little perplexed by the ctr variable. Every example I've seen so far has the name of this variable set to ctr, but I cant seem to find any good resource on what it means or why exactly this name is used.
If anyone knows more about it, I would be happy to hear it!
public static int[] calcArray(int[] arrName, int arrSize, int seed)
{
Parallel.For(0, arrSize, ctr =>
{
arrName[ctr] = AllfunctionsClass.Random(seed);
seed++;
});
return arrName;
}