Edytuj

Udostępnij za pośrednictwem


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

Definition

Fills an area in a given 2D T array instance with a specified value. This API will try to fill as many items as possible, ignoring positions outside the bounds of the array. If invalid coordinates are given, they will simply be ignored and no exception will be thrown.

public static void Fill<T> (this T[,] array, T value, int row, int column, 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, column As Integer, width As Integer, height As Integer)

Type Parameters

T

The type of elements in the input 2D T array instance.

Parameters

array
T[,]

The input T array instance.

value
T

The T value to fill the target area with.

row
Int32

The row to start on (inclusive, 0-based index).

column
Int32

The column to start on (inclusive, 0-based index).

width
Int32

The positive width of area to fill.

height
Int32

The positive height of area to fill.

Applies to