Q:

Arbitrarily long Parallel.For loops in C# .NET

Parallel.For allows loops with a max iteration of long.MaxValue
Parallel.For(long fromInclusive, long toExclusive, Action<long> body)
{
}

but what if I need to perform a Parallel loop which would have vastly more iterations than long.MaxValue?
E.G. I have a function which returns the number of required iterations as a BigInteger (because long and ulong are not big enough).
Would I have to "roll my own" Parallel.For implementation. My gut feeling is that this is going to be bad practice!
EDIT: Based on various comments...I think I have bitten off more than I can chew!

A:

Int64.MaxValue is 9,223,372,036,854,775,807.
If you need to perform more iterations then you really need to reconsider your design.

A:

I agree with @davenewza, but if you must, this can be a solution
Parallel.ForEach(BigIntSequence(1,10), (i) => Console.WriteLine(i));

public IEnumerable<BigInteger> BigIntSequence(BigInteger min,BigInteger max)
{
    BigInteger bi = min;
    while (bi<max)
    {
        yield return bi;
        bi += 1;     
    }
}

