From Xojo Documentation

Revision as of 15:57, 15 December 2020 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Arrays.RemoveAt(index As Integer)

New in 2020r2

Supported for all project types and targets.

Removes the specified element from the array.


array.RemoveAt index

Part Type Description
array Any data type Required. The array from which to remove the element.
index Integer Required. The index number to be removed.


The RemoveAt method removes the index element from the array. The remaining elements are shifted down to the removed element so that there are no gaps in the array.

The RemoveAt method works with one-dimensional arrays only.

Arrays can have a maximum index value of 2,147,483,646.

Sample Code

This example removes element 1 from the aNames array:

Var names() As String = Array("Bob", "Tom", "Jane")
// names() = "Bob", "Jane"

See Also

Var statement; Arrays concept; ParamArray keyword