Random32.NextBytes Method

Definition

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

Overload List

NextBytes(Byte[])Fills the elements of a specified array of bytes with random numbers.
NextBytes(Span<Byte>)Fills the elements of a specified span of bytes with random numbers.
NextBytes(Byte[], Boolean) Fills the elements of a specified span of bytes with random numbers.
NextBytes(Span<Byte>, Boolean) Fills the elements of a specified span of bytes with random numbers.

NextBytes(Span<Byte>)

Fills the elements of a specified span of bytes with random numbers.
C#
public override void NextBytes(
	Span<byte> buffer
)

Parameters

buffer  Span<Byte>
The array to be filled with random numbers.

NextBytes(Byte[], Boolean)

Fills the elements of a specified span of bytes with random numbers.
C#
public void NextBytes(
	byte[] buffer,
	bool compatibleByteOrder
)

Parameters

buffer  Byte[]
The array to be filled with random numbers.
compatibleByteOrder  Boolean
Specifies whether the order of each set of 4 bytes (32 bits) should be reversed.

Remarks

As of version 9, a more efficient implementation means that the order of each set of 4 bytes is reversed. To obtain identical results to previous versions, set compatibleByteOrder to true.

NextBytes(Span<Byte>, Boolean)

Fills the elements of a specified span of bytes with random numbers.
C#
public void NextBytes(
	Span<byte> buffer,
	bool compatibleByteOrder
)

Parameters

buffer  Span<Byte>
The span to be filled with random numbers.
compatibleByteOrder  Boolean
Specifies whether the order of each set of 4 bytes (32 bits) should be reversed.

Remarks

As of version 9, a more efficient implementation means that the order of each set of 4 bytes is reversed. To obtain identical results to previous versions, set compatibleByteOrder to true.

See Also