QueryableExtensionsElementAt Method |
Returns the element at a specified index in a sequence.
Namespace: Kettic.AspNet.Data.ExtensionsAssembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntaxpublic static Object ElementAt(
this IQueryable source,
int index
)
<ExtensionAttribute>
Public Shared Function ElementAt (
source As IQueryable,
index As Integer
) As Object
public:
[ExtensionAttribute]
static Object^ ElementAt(
IQueryable^ source,
int index
)
static member ElementAt :
source : IQueryable *
index : int -> Object
Parameters
- source
- Type: System.LinqIQueryable
An IQueryable to return an element from. - index
- Type: SystemInt32
The zero-based index of the element to retrieve.
Return Value
Type:
Object The element at the specified position in
source.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IQueryable. 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).
ExceptionsException | Condition |
---|
ArgumentNullException | source is null. |
ArgumentOutOfRangeException | index is less than zero. |
See Also