SynchronizedCollection<T>.IList.Insert(Int32, Object) Méthode
Définition
Insère un objet dans la collection à un index spécifié.Inserts an object into the collection at a specified index.
virtual void System.Collections.IList.Insert(int index, System::Object ^ value) = System::Collections::IList::Insert;
void IList.Insert (int index, object value);
abstract member System.Collections.IList.Insert : int * obj -> unit
override this.System.Collections.IList.Insert : int * obj -> unit
Sub Insert (index As Integer, value As Object) Implements IList.Insert
Paramètres
- index
- Int32
Index de base zéro au niveau duquel value
doit être inséré.The zero-based index at which value
is to be inserted.
- value
- Object
Objet à insérer dans la collection.The object to insert into the collection.
Implémente
Exceptions
L'index
spécifié est inférieur à zéro ou supérieur au nombre d'éléments contenus dans la collection.The index
specified is less than zero or greater than the number of items in the collection.
La value
définie est null
ou n'est pas du type générique correct T
pour la collection.The value
set is null
or is not of the correct generic type T
for the collection.
Remarques
Si l'index
est égal au nombre d'éléments dans la collection, l'élément est ajouté à la liste.If the index
is equal to the number of elements in the collection, the item is appended to the list. Si l'index
est inférieur au nombre d'éléments dans la collection, les éléments qui suivent le point d'insertion de l'élément descendent afin de prendre en compte le nouvel élément.If the index
is less than the number of elements in the collection, the elements that follow the point of insertion of the item move down to accommodate the new element.