Internet Direct (Indy) Version 9.0.2 Beta
TIdObjectList.Insert
Adds an object to the list at a specified position.

procedure Insert(AIndex: Integer; AObject: TObject);
Parameters
AIndex: Integer
- Position in the list for the new object instance.

AObject: TObject
Object instance to be stored in the list.

Description
Insert is a procedure used to add an object at a specified position in the list, shifting the item that previously occupied that position (and all subsequent items) up. Insert increments Count and, if necessary, allocates memory by increasing the value of Capacity.

The Index parameter is zero-based, so the first position in the list has an index of 0.

To replace a nil reference with a new object without growing the array, set the Items property directly.