語言

AsyncEnumerable.Shuffle<TSource> 方法

定義

洗牌序列中元素的順序。

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)

類型參數

TSource

元素 source的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的數值要洗牌。

傳回

IAsyncEnumerable<TSource>

一個元素與輸入序列隨機順序對應的序列。

備註

隨機化是使用非密碼學安全的隨機數產生器來完成的。

適用於