ArrayExtensions.GetRow<T>(T[,], Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.