IRandom Source.Next Int 64 Method
Definition
Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Overload List
| Next | Returns a non-negative random 64-bit integer. |
| Next | Returns a non-negative random 64-bit integer less than the specified maximum. |
| Next | Returns a random 64-bit integer within a specified range. |
NextInt64
Returns a non-negative random 64-bit integer.
NextInt64(Int64)
Returns a non-negative random 64-bit integer less than the specified maximum.
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 in the range [0, maxValue). If maxValue equals 0, returns 0.
Exceptions
| Argument | maxValue is less than 0. |
NextInt64(Int64, Int64)
Returns a random 64-bit integer within a specified range.
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 in the range [minValue, maxValue). If minValue equals maxValue, returns minValue.
Exceptions
| Argument | minValue is greater than maxValue. |