MoreLinq
Index<(Of <(<'TSource>)>)> Method (source)
NamespacesMoreLinqMoreEnumerableIndex<(Of <<'(TSource>)>>)(IEnumerable<(Of <<'(TSource>)>>))
Returns a sequence of KeyValuePair<(Of <(<'TKey, TValue>)>)> where the key is the zero-based index of the value in the source sequence.
Declaration Syntax
C#Visual BasicVisual C++
public static IEnumerable<KeyValuePair<int, TSource>> Index<TSource>(
	this IEnumerable<TSource> source
)
<ExtensionAttribute> _
Public Shared Function Index(Of TSource) ( _
	source As IEnumerable(Of TSource) _
) As IEnumerable(Of KeyValuePair(Of Integer, TSource))
public:
[ExtensionAttribute]
generic<typename TSource>
static IEnumerable<KeyValuePair<int, TSource>>^ Index(
	IEnumerable<TSource>^ source
)
Generic Template Parameters
TSource
Type of elements in source sequence.
Parameters
source (IEnumerable<(Of <(<'TSource>)>)>)
The source sequence.
Return Value
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<(Of <(<'TSource>)>)>. When you use instance method syntax to call this method, omit the first parameter.
Remarks
This operator uses deferred execution and streams its results.

Assembly: MoreLinq (Module: MoreLinq.dll) Version: 1.0.16006.0 (1.0.16006.1845)