RandomGeneratorExtensions.NextInt64 Method

Definition

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

Overload List

NextInt64<TGenerator>(TGenerator) Generates a random 64-bit non-negative integer.
NextInt64<TGenerator>(TGenerator, Int64) Generates a random 64-bit non-negative integer less than the specified maximum.
NextInt64<TGenerator>(TGenerator, Int64, Int64) Generates a random 64-bit integer within a specified range.

NextInt64<TGenerator>(TGenerator)

Generates a random 64-bit non-negative integer.
C#
public static long NextInt64<TGenerator>(
	this ref TGenerator generator
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

generator  TGenerator
 

Type Parameters

TGenerator

Return Value

Int64

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TGenerator. 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).

NextInt64<TGenerator>(TGenerator, Int64)

Generates a random 64-bit non-negative integer less than the specified maximum.
C#
public static long NextInt64<TGenerator>(
	this ref TGenerator generator,
	long maxValue
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

generator  TGenerator
 
maxValue  Int64
 

Type Parameters

TGenerator

Return Value

Int64

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TGenerator. 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).

NextInt64<TGenerator>(TGenerator, Int64, Int64)

Generates a random 64-bit integer within a specified range.
C#
public static long NextInt64<TGenerator>(
	this ref TGenerator generator,
	long minValue,
	long maxValue
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

generator  TGenerator
 
minValue  Int64
 
maxValue  Int64
 

Type Parameters

TGenerator

Return Value

Int64

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TGenerator. 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