Collection<T>.IList.Insert(Int32, Object) Méthode

Définition

Insère un élément dans l’index IList spécifié.

 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 auquel value doit être inséré.

value
Object

À Object insérer dans le IList.

Implémente

Exceptions

index n’est pas un index valide dans le IList.

value est d’un type qui n’est pas assignable au IList.

Remarques

Si index elle est égale au nombre d’éléments dans le IList, elle value est ajoutée à la fin.

Cette méthode est une opération O(n), où n est Count.

S’applique à