BigInteger.Random Method

Definition

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

Overload List

Random(IRandomSource, Int32) Returns a random BigInteger number with the specified number of bits.
Random(Random, Int32) Returns a random BigInteger number with the specified number of bits.

Random(IRandomSource, Int32)

Returns a random BigInteger number with the specified number of bits.
C#
public static BigInteger Random(
	IRandomSource random,
	int numberOfBits
)

Parameters

random  IRandomSource
The random number generator used to generate the random bits.
numberOfBits  Int32
The number of bits in the number.

Return Value

BigInteger
A random number with exactly numberOfBits bits.

Random(Random, Int32)

Returns a random BigInteger number with the specified number of bits.
C#
public static BigInteger Random(
	Random random,
	int numberOfBits
)

Parameters

random  Random
The random number generator used to generate the random bits.
numberOfBits  Int32
The number of bits in the number.

Return Value

BigInteger
A random number with exactly numberOfBits bits.

See Also