System.Generics.Collections.TList.Insert
Delphi
procedure Insert(Index: Integer; const Value: T); inline;
C++
void __fastcall Insert(int Index, const T Value);
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
procedure function |
public | System.Generics.Collections.pas System.Generics.Collections.hpp |
System.Generics.Collections | TList |
説明
リストにエントリを挿入します。
Insert は、要素 Value をリスト内のインデックス Index の位置に挿入します。リストの Count が既に Capacity と等しい場合には、Capacity が増やされます。
このリストで Index
が有効でない場合には、EArgumentOutOfRangeException 例外が発生します。
これは O(n) 操作であり、ここでの n はリスト内の項目の数です。
OnNotify イベントが発生し、リストに項目が挿入されたことを示します。