IEnumerableExtensionsElementAtTSource Method |
Returns the element at a specified index in a sequence.
Namespace: Bio.UtilAssembly: Bio.Core (in Bio.Core.dll) Version: 2.0.0.1 (2.0.0.1)
Syntax public static TSource ElementAt<TSource>(
this IEnumerable<TSource> collection,
long index
)
<ExtensionAttribute>
Public Shared Function ElementAt(Of TSource) (
collection As IEnumerable(Of TSource),
index As Long
) As TSource
public:
[ExtensionAttribute]
generic<typename TSource>
static TSource ElementAt(
IEnumerable<TSource>^ collection,
long long index
)
[<ExtensionAttribute>]
static member ElementAt :
collection : IEnumerable<'TSource> *
index : int64 -> 'TSource
Parameters
- collection
- Type: System.Collections.GenericIEnumerableTSource
An System.Collections.Generic.IEnumerable to return an element from. - index
- Type: SystemInt64
The zero-based index of the element to retrieve.
Type Parameters
- TSource
- The type of the elements of source.
Return Value
Type:
TSourceThe element at the specified position in the source sequence.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableTSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also