[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Classes' (#rtl)

TCollection.Insert

Insert an item in the collection.

Declaration

Source position: classesh.inc line 506

public function TCollection.Insert(

  Index: Integer

):TCollectionItem;

Description

Insert creates a new item instance and inserts it in the collection at position Index, and returns the new instance.

In contrast, TCollection.Add adds a new item at the end.

Errors

None.

See also

TCollection.Add

  

Creates and adds a new item to the collection.

TCollection.Delete

  

Delete an item from the collection.

TCollection.Items

  

Indexed array of items in the collection.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.