Method

Arrays.Append


Warning

This item was deprecated in version 2020r2. Please use Arrays.Add as a replacement.

Description

Adds a new row to the end of a one-dimensional array, increasing the size of the array by one. The value must match the data type of the array.

Usage

array.Append(value)

Part

Description

array

Required. The array to to which you wish to add rows.

value

The value to be assigned to the new array element.

Notes

The Append method works with one-dimensional arrays only.

Sample code

This example adds a new row to the end of the names array. The new element becomes the last row of the array.

Var names() As String
names.Append("Betty")

Compatibility

All project types on all supported operating systems.

See also

Arrays parent class; Var statement; Arrays concept for a complete list of functions; ParamArray keyword