IRng Interface
A Random Number Generator (RNG)

IRng

XorShift

ChaCha

ISeekableRng<TCounter>

Pcg32

ICryptoRng

ThreadLocalRng

CryptoServiceProvider

StandardRng

Mt1993764

SmallRng

BlockBuffer32<TBlockRng>

BlockBuffer32<TBlockRng, TBlockCounter>

Syntax

public interface IRng

Methods

NameReturn ValueSummary
Fill(Span<byte>)void
Completely fills the span with random bytes.
NextUInt32()uint
Returns the next 32 bits in the sequence as a UInt32.
NextUInt64()ulong
Returns the next 64 bits in the sequence as a UInt64.

Extension Methods

NameValueSummary
ShuffleInPlace<IRng, T>(IList<T>)void
Shuffles a list using the in-place Fisher-Yates shuffling algorithm.
ShuffleInPlace<IRng, T>(Span<T>)void
Shuffles a span using the in-place Fisher-Yates shuffling algorithm.