API:System.Contnrs.TClassList.Insert
Delphi
procedure Insert(Index: Integer; AClass: TClass); inline;
C++
HIDESBASE void __fastcall Insert(int Index, System::TClass AClass);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Contnrs.pas System.Contnrs.hpp |
System.Contnrs | TClassList |
Description
Adds an object to the Items array at the position specified by Index.
System.Contnrs.TClassList.Insert inherits from System.Classes.TList.Insert. All content below this line refers to System.Classes.TList.Insert.
Adds an object to the Items array at the position specified by Index.
Call Insert to add Item to the middle of the Items array. The Index parameter is a zero-based index, so the first position in the array has an index of 0. Insert adds the item at the indicated position, 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.
To replace a nil (Delphi) or NULL (C++) pointer in the array with a new item, without growing the Items array, set the Items property.