System.Generics.Collections.TList.InsertRange

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

procedure InsertRange(Index: Integer; const Values: array of T; Count: Integer); overload;
procedure InsertRange(Index: Integer; const Values: array of T); overload;
procedure InsertRange(Index: Integer; const Collection: IEnumerable<T>); overload;
procedure InsertRange(Index: Integer; const Collection: TEnumerable<T>); overload;

C++

void __fastcall InsertRange(int Index, const T *Values, const int Values_High, int Count)/* overload */;
void __fastcall InsertRange(int Index, const T *Values, const int Values_High)/* overload */;
void __fastcall InsertRange(int Index, const System::DelphiInterface<System::IEnumerable__1<T> > Collection)/* overload */;
void __fastcall InsertRange(int Index, TEnumerable__1<T>* const Collection)/* overload */;

Propriétés

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

Description

Insère une collection dans une liste.

InsertRange insère un tableau de valeurs Values dans la liste à l'index spécifié par Index. Si la valeur Count de la liste plus les entrées supplémentaires est supérieure à Capacity, Capacity est augmentée.

Si Index n'est pas valide pour la liste, une exception EArgumentOutOfRangeException est déclenchée.

C'est une opération O(n + m), où n est le nombre d'éléments de la liste et m est le nombre d'entrées de Values.

Un événement OnNotify survient en indiquant que les éléments ont été insérés dans la liste.

Voir aussi