fill

Summary

Fills the array with the specified value.

Usage

public T[] fill(T value)

Returns

The array filled with the specified value.

Parameters

value

The value to fill the array with.

Description

Fills the array with the specified value.

This method mutates the array.

Examples

Zero fill array
1
2
3
4
import System;
 
Array<int> zerofill = new Array<int>(500);
zerofill.fill(0);

Share

HTML | BBCode | Direct Link