Show: Delphi C++
Display Preferences

System.Generics.Collections.TList.Insert

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Insert(Index: Integer; const Value: T); inline;

C++

void __fastcall Insert(int Index, const T Value);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Generics.Collections.pas
System.Generics.Collections.hpp
System.Generics.Collections TList

Description

Insert entry in list.

Insert inserts an element Value in the list at the index Index. If the list Count is already equal to Capacity, Capacity is increased.

If Index is not valid for the list, an EArgumentOutOfRangeException exception is raised.

This is an O(n) operation, where n is the number of items in the list.

An OnNotify event occurs indicating that an item was inserted in the list.

See Also

Code Examples


Personal tools
In Other Languages
Previous Versions
Assistance