TypedTableBaseExtensions.ElementAtOrDefault<TRow> Metoda

Definicja

Zwraca element w określonym wierszu w sekwencji lub wartość domyślną, jeśli wiersz jest poza zakresem.

public:
generic <typename TRow>
 where TRow : System::Data::DataRow[System::Runtime::CompilerServices::Extension]
 static TRow ElementAtOrDefault(System::Data::TypedTableBase<TRow> ^ source, int index);
public static TRow ElementAtOrDefault<TRow> (this System.Data.TypedTableBase<TRow> source, int index) where TRow : System.Data.DataRow;
public static TRow? ElementAtOrDefault<TRow> (this System.Data.TypedTableBase<TRow> source, int index) where TRow : System.Data.DataRow;
static member ElementAtOrDefault : System.Data.TypedTableBase<'Row (requires 'Row :> System.Data.DataRow)> * int -> 'Row (requires 'Row :> System.Data.DataRow)
<Extension()>
Public Function ElementAtOrDefault(Of TRow As DataRow) (source As TypedTableBase(Of TRow), index As Integer) As TRow

Parametry typu

TRow

Typ elementów lub wiersza.

Parametry

source
TypedTableBase<TRow>

Obiekt wyliczalny, z który ma zwrócić element.

index
Int32

Indeks zerowy elementu do pobrania.

Zwraca

TRow

Element w określonym wierszu w sekwencji.

Dotyczy