Editar

Compartilhar via


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

Definition

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

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

Span<T>

A Span<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