public void CanSampleBigInteger() { var rnd = new System.Random(0); //Main case IEnumerator <BigInteger> Sequence = rnd.NextBigIntegerSequence((BigInteger)long.MinValue * 3, (BigInteger)long.MaxValue * 3).GetEnumerator(); Sequence.MoveNext(); System.Console.WriteLine(Sequence.Current); Sequence.MoveNext(); System.Console.WriteLine(Sequence.Current); Sequence.MoveNext(); System.Console.WriteLine(Sequence.Current); //Boundary conditions System.Console.WriteLine(rnd.NextBigIntegerSequence(0, 1).First()); }
public void CanSampleBigInteger() { var rnd = new System.Random(0); IEnumerator <BigInteger> Sequence = rnd.NextBigIntegerSequence((BigInteger)long.MinValue * 3, (BigInteger)long.MaxValue * 3).GetEnumerator(); Sequence.MoveNext(); System.Console.WriteLine(Sequence.Current); Sequence.MoveNext(); System.Console.WriteLine(Sequence.Current); Sequence.MoveNext(); System.Console.WriteLine(Sequence.Current); }