ICounterBased<T>.GetCounter Method

Copies the current counter into the provided destination span.

Definition

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

Parameters

destination  Span<T>
The destination span that will receive the counter words. Its length must exactly match the engine's counter length.

Remarks

Implementations must copy the counter words into destination. This avoids returning spans that reference engine-owned storage which could become invalid when called through boxed structs.

Exceptions

ArgumentException Thrown when destination.Length != the engine counter length.

See Also