Random 32.Next Int 64 Method
Definition
Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
Next | Returns a non-negative random integer. |
Next | Returns a non-negative random integer that is less than the specified maximum. |
Next | Returns a random integer that is within a specified range. |
NextInt64
Returns a non-negative random integer.
public override long NextInt64()
Return Value
Int64A 64-bit signed integer that is greater than or equal to 0 and less than Int64.MaxValue.
NextInt64(Int64)
Returns a non-negative random integer that is less than the specified maximum.
public override long NextInt64(
long maxValue
)
Parameters
- maxValue Int64
- The exclusive upper bound of the random number to be generated. maxValue must be greater than or equal to 0.
Return Value
Int64A 64-bit signed integer that is greater than or equal to 0, and less than maxValue; that is, the range of return values ordinarily includes 0 but not maxValue. However, if maxValue equals 0, maxValue is returned.
Exceptions
Argument | maxValue is less than 0. |
NextInt64(Int64, Int64)
Returns a random integer that is within a specified range.
public override long NextInt64(
long minValue,
long maxValue
)
Parameters
- minValue Int64
- The inclusive lower bound of the random number returned.
- maxValue Int64
- The exclusive upper bound of the random number returned. maxValue must be greater than or equal to minValue.
Return Value
Int64A 64-bit signed integer greater than or equal to minValue and less than maxValue; that is, the range of return values includes minValue but not maxValue. If minValue equals maxValue, minValue is returned.
Exceptions
Argument | minValue is greater than maxValue. |