Edit

Share via


AsyncEnumerable.Shuffle<TSource> Method

Definition

Shuffles the order of the elements of a sequence.

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)

Type Parameters

TSource

The type of the elements of source.

Parameters

source
IAsyncEnumerable<TSource>

A sequence of values to shuffle.

Returns

IAsyncEnumerable<TSource>

A sequence whose elements correspond to those of the input sequence in randomized order.

Remarks

Randomization is performed using a non-cryptographically-secure random number generator.

Applies to