Editar

Compartilhar via


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

Definition

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

public static Memory<T> GetRowMemory<T> (this T[,] array, int row);
static member GetRowMemory : 'T[,] * int -> Memory<'T>
<Extension()>
Public Function GetRowMemory(Of T) (array As T(,), row As Integer) As Memory(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

Memory<T>

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

Exceptions

Thrown when array doesn't match T.

Thrown when row is invalid.

Applies to