Method Fill
Fill<T>(T[], T)
Assigns the specified value to each element of the specified array.
Declaration
public static void Fill<T>(T[] a, T val)
Parameters
Type | Name | Description |
---|---|---|
T[] | a | the array to be filled |
T | val | the value to be stored in all elements of the array |
Type Parameters
Name | Description |
---|---|
T | the type of the array |
Fill<T>(T[], Int32, Int32, T)
Assigns the specified long value to each element of the specified
range of the specified array of longs. The range to be filled
extends from index fromIndex
, inclusive, to index
toIndex
, exclusive. (If fromIndex==toIndex
, the
range to be filled is empty.)
Declaration
public static void Fill<T>(T[] a, int fromIndex, int toIndex, T val)
Parameters
Type | Name | Description |
---|---|---|
T[] | a | the array to be filled |
System.Int32 | fromIndex | the index of the first element (inclusive) to be filled with the specified value |
System.Int32 | toIndex | the index of the last element (exclusive) to be filled with the specified value |
T | val | the value to be stored in all elements of the array |
Type Parameters
Name | Description |
---|---|
T | the type of the array |