TypedTableBaseExtensions.ElementAtOrDefault<TRow> Method

Definition

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

C#
public static TRow? ElementAtOrDefault<TRow>(this System.Data.TypedTableBase<TRow> source, int index) where TRow : System.Data.DataRow;
C#
public static TRow ElementAtOrDefault<TRow>(this System.Data.TypedTableBase<TRow> source, int index) where TRow : System.Data.DataRow;

Type Parameters

TRow

The type of the elements or the row.

Parameters

source
TypedTableBase<TRow>

An enumerable object to return an element from.

index
Int32

The zero-based index of the element to retrieve.

Returns

TRow

The element at a specified row in a sequence.

Applies to

Produkt Verzie
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1