Enumerable.Index<TSource>(IEnumerable<TSource>) Methode

Definitie

Retourneert een opsomming die de index van het element in een tuple bevat.

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

Type parameters

TSource

Het type van de elementen van source.

Parameters

source
IEnumerable<TSource>

De bron opsommen die de elementen levert.

Retouren

Een opsomming die elke elementindex in een tuple bevat.

Uitzonderingen

source is null.

Van toepassing op