public static UInt64 NextUInt64(this Random random, UInt64 lowerBound, UInt64 upperBound) { lowerBound.ThrowIfStrictlyGreaterThan(upperBound, nameof(lowerBound)); var value = random.NextUInt64() % (upperBound + 1 - lowerBound) + lowerBound; return value; }