Rationale
It is sometimes desirable to generate random numbers as inputs to tests. This works nicely for the majority of the primitive types, but not for long/ulong.
As such, I propose a method be exposed that allows the generation of random 64-bit integer values.
Proposed API
public class Random
{
public virtual long NextInt64();
public virtual long NextInt64(long maxValue);
public virtual long NextInt64(long minValue, long maxValue);
}
Rationale
It is sometimes desirable to generate random numbers as inputs to tests. This works nicely for the majority of the primitive types, but not for
long/ulong.As such, I propose a method be exposed that allows the generation of random 64-bit integer values.
Proposed API