Edit

Share via


ArrayExtensions.GetColumn<T>(T[][], Int32) Method

Definition

Yields a column from a jagged array. An exception will be thrown if the column is out of bounds, and return default in places where there are no elements from inner arrays. Note: There is no equivalent GetRow method, as you can use array[row] to retrieve.

public static System.Collections.Generic.IEnumerable<T?> GetColumn<T> (this T?[][] rectarray, int column);
static member GetColumn : 'T[][] * int -> seq<'T>
<Extension()>
Public Iterator Function GetColumn(Of T) (rectarray As T()(), column As Integer) As IEnumerable(Of T)

Type Parameters

T

The element type of the array.

Parameters

rectarray
T[][]

The source array.

column
Int32

Column record to retrieve, 0-based index.

Returns

Yielded enumerable of column elements for given column, and default values for smaller inner arrays.

Applies to