Edit

Share via


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

Definition

Fills elements of a rectangular array at the given position and size to a specific value. Ranges given will fill in as many elements as possible, ignoring positions outside the bounds of the array.

public static void Fill<T>(this T[,] array, T value, int row, int col, int width, int height);
static member Fill : 'T[,] * 'T * int * int * int * int -> unit
<Extension()>
Public Sub Fill(Of T) (array As T(,), value As T, row As Integer, col As Integer, width As Integer, height As Integer)

Type Parameters

T

The element type of the array.

Parameters

array
T[,]

The source array.

value
T

Value to fill with.

row
Int32

Row to start on (inclusive, zero-index).

col
Int32

Column to start on (inclusive, zero-index).

width
Int32

Positive width of area to fill.

height
Int32

Positive height of area to fill.

Applies to