TypedTableBaseExtensions.ElementAtOrDefault(Of TRow) Method (TypedTableBase(Of TRow), Int32)

.NET Framework (current version)
 

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

Namespace:   System.Data
Assembly:  System.Data.DataSetExtensions (in System.Data.DataSetExtensions.dll)

<ExtensionAttribute>
Public Shared Function ElementAtOrDefault(Of TRow As DataRow) (
	source As TypedTableBase(Of TRow),
	index As Integer
) As TRow

Parameters

source
Type: System.Data.TypedTableBase(Of TRow)

An enumerable object to return an element from.

index
Type: System.Int32

The zero-based index of the element to retrieve.

Return Value

Type: TRow

The element at a specified row in a sequence.

Type Parameters

TRow

The type of the elements or the row.

.NET Framework
Available since 4.5
Return to top
Show: