AsyncEnumerable.Index<TSource>(IAsyncEnumerable<TSource>) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an enumerable that incorporates the element's index into a tuple.
public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IAsyncEnumerable<ValueTuple<int, TSource>> ^ Index(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source);
C#
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
The type of the elements of source
.
- source
- IAsyncEnumerable<TSource>
The source enumerable providing the elements.
An enumerable that incorporates each element index into a tuple.
source
is null
.
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided), 10 |
.NET Standard | 2.0 (package-provided) |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: