IStateful.SaveState Method

Saves the engine's state to the destination span in a stable little-endian format.

Definition

Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
void SaveState(
	Span<byte> destination
)

Parameters

destination  Span<Byte>
The destination span where state bytes will be written. Must have a length of at least StateSize.

Remarks

The destination span may be larger than StateSize; only the first StateSize bytes are written. The remaining bytes are left unchanged.

The state format uses little-endian byte order for all multi-byte values, ensuring cross-platform portability.

Exceptions

ArgumentException Thrown when destination.Length < StateSize.

See Also