Modifier

Partager via


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

Definition

Returns a RefEnumerable<T> over a row in a given 2D T array instance.

public static Microsoft.Toolkit.HighPerformance.Enumerables.RefEnumerable<T> GetRow<T> (this T[,] array, int row);
static member GetRow : 'T[,] * int -> Microsoft.Toolkit.HighPerformance.Enumerables.RefEnumerable<'T>
<Extension()>
Public Function GetRow(Of T) (array As T(,), row As Integer) As RefEnumerable(Of T)

Type Parameters

T

The type of elements in the input 2D T array instance.

Parameters

array
T[,]

The input T array instance.

row
Int32

The target row to retrieve (0-based index).

Returns

A RefEnumerable<T> with the items from the target row within array.

Exceptions

Thrown when one of the input parameters is out of range.

Remarks

The returned RefEnumerable<T> value shouldn't be used directly: use this extension in a foreach loop.

Applies to