, (, COUNT_BIG COUNT sql-), . , , :
private static Random _r = new Random(1);
public static IEnumerable<BigInteger> RandomSequence(int upTo)
{
while (true) {
var next = _r.Next();
if (next > upTo)
yield break;
yield return next;
}
}
. , 2B . , , int.MaxValue - 5. :
RandomSequence(int.MaxValue - 5).Count();
( Count checked). LongCount !
RandomSequence(int.MaxValue - 5).LongCount();
, , , 1 Random.Next , int.MaxValue - 5 2583066202!
, , .