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>

一个序列,其元素按随机顺序对应于输入序列的元素。

注解

使用非加密安全随机数生成器执行随机化。

适用于