AsyncEnumerable.Shuffle<TSource> Metod

Definition

Blandar ordningen på elementen i en sekvens.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TSource> ^ Shuffle(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source);
public static System.Collections.Generic.IAsyncEnumerable<TSource> Shuffle<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource> source);
static member Shuffle : System.Collections.Generic.IAsyncEnumerable<'Source> -> System.Collections.Generic.IAsyncEnumerable<'Source>
<Extension()>
Public Function Shuffle(Of TSource) (source As IAsyncEnumerable(Of TSource)) As IAsyncEnumerable(Of TSource)

Typparametrar

TSource

Typen av element sourcei .

Parametrar

source
IAsyncEnumerable<TSource>

En sekvens med värden som ska blandas.

Returer

IAsyncEnumerable<TSource>

En sekvens vars element motsvarar indatasekvensens i slumpmässig ordning.

Kommentarer

Slumpmässighet utförs med hjälp av en icke-kryptografiskt säker slumptalsgenerator.

Gäller för