Click or drag to resize
QueryableExtensionsElementAt Method
Returns the element at a specified index in a sequence.

Namespace: Kettic.AspNet.Data.Extensions
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public static Object ElementAt(
	this IQueryable source,
	int index
)

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).
Exceptions
ExceptionCondition
ArgumentNullExceptionsource is null.
ArgumentOutOfRangeExceptionindex is less than zero.
See Also