RandomExtensions.NextUInt64 Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0

Overload List

NextUInt64(Random) Returns a random 64-bit integer.
NextUInt64(Random, UInt64) Returns a non-negative random integer that is less than the specified maximum.

NextUInt64(Random)

Returns a random 64-bit integer.
C#
public static ulong NextUInt64(
	this Random random
)

Parameters

random  Random
 

Return Value

UInt64
A 64-bit unsigned integer.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

NextUInt64(Random, UInt64)

Returns a non-negative random integer that is less than the specified maximum.
C#
public static ulong NextUInt64(
	this Random random,
	ulong maxValue
)

Parameters

random  Random
 
maxValue  UInt64
The exclusive upper bound of the random number to be generated.

Return Value

UInt64
A 64-bit unsigned integer that is greater than or equal to 0.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also