Queryable.Index<TSource>(IQueryable<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.
Return index and the associated item.
public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
static System::Linq::IQueryable<ValueTuple<int, TSource>> ^ Index(System::Linq::IQueryable<TSource> ^ source);
C#
public static System.Linq.IQueryable<(int Index, TSource Item)> Index<TSource>(this System.Linq.IQueryable<TSource> source);
static member Index : System.Linq.IQueryable<'Source> -> System.Linq.IQueryable<ValueTuple<int, 'Source>>
<Extension()>
Public Function Index(Of TSource) (source As IQueryable(Of TSource)) As IQueryable(Of ValueTuple(Of Integer, TSource))
- TSource
The type of the elements of source
.
- source
- IQueryable<TSource>
An IQueryable<T> to return an element from.
An enumerable that incorporates each element index into a tuple.
source
is null
.
Product | Versions |
---|---|
.NET | 9, 10 |
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: