AsyncEnumerable.Index<TSource>(IAsyncEnumerable<TSource>) 方法

定义

返回一个可枚举值,该枚举将元素的索引合并到元组中。

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

类型参数

TSource

的元素 source的类型。

参数

source
IAsyncEnumerable<TSource>

提供元素的源可枚举。

返回

一个枚举,用于将每个元素索引合并到元组中。

例外

sourcenull

适用于