IEnumerable<T>.ElementAtOrDefault(Integer) Method

Returns the element at a specified index in a sequence or a default value if the index is out of range.

Namespace: Spring.Collections
 function ElementAtOrDefault(index: Integer): T; overload;


Type: Integer

The zero-based index of the element to retrieve.

Return Value

Type: T

Default(T) if the index is outside the bounds of the source sequence; otherwise, the element at the specified position in the source sequence.