Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

RandomNumberGenerator.Shuffle<T>(Span<T>) Method

Definition

Namespace:
System.Security.Cryptography
Assemblies:
netstandard.dll, System.Security.Cryptography.dll
Source:
RandomNumberGenerator.cs
Source:
RandomNumberGenerator.cs
Source:
RandomNumberGenerator.cs
Source:
RandomNumberGenerator.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Performs an in-place shuffle of a span using cryptographically random number generation.

public:
generic <typename T>
 static void Shuffle(Span<T> values);
public static void Shuffle<T>(Span<T> values);
static member Shuffle : Span<'T> -> unit
Public Shared Sub Shuffle(Of T) (values As Span(Of T))

Type Parameters

T

The type of span.

Parameters

values
Span<T>

The span to shuffle.

Applies to


Feedback

Was this page helpful?