TEnumerableBase<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.Base
public
 function ElementAtOrDefault(index: Integer): T; overload;

Parameters

index
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.

Implements

IEnumerable<T>.ElementAtOrDefault(Integer)