From Xojo Documentation

Revision as of 18:51, 24 November 2020 by PLefebvre (talk | contribs) (Usage)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Arrays.Add(value As DataType)

New in 2020r2

Supported for all project types and targets.

Adds a new element 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.



Part Description
array Required. The array to to which you wish to add elements.
value The value to be assigned to the new array element.


The Add method works with one-dimensional arrays only.

Sample Code

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

Var names() As String

See Also

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