Editar

Compartilhar via


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

Definition

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

public static Microsoft.Toolkit.HighPerformance.Enumerables.Array2DRowEnumerable<T> GetRow<T> (this T[,] array, int row);
static member GetRow : 'T[,] * int -> Microsoft.Toolkit.HighPerformance.Enumerables.Array2DRowEnumerable<'T>
<Extension()>
Public Function GetRow(Of T) (array As T(,), row As Integer) As Array2DRowEnumerable(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 Span<T> with the items from the target row within array.

Applies to