List<T>.IList.Add(Object) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Ajoute un élément au IList.
virtual int System.Collections.IList.Add(System::Object ^ item) = System::Collections::IList::Add;
int IList.Add(object item);
abstract member System.Collections.IList.Add : obj -> int
override this.System.Collections.IList.Add : obj -> int
Function Add (item As Object) As Integer Implements IList.Add
Paramètres
Retours
Position dans laquelle le nouvel élément a été inséré.
Implémente
Exceptions
item est d’un type qui n’est pas assignable au IList.
Remarques
Si Count elle Capacityest inférieure à , cette méthode est une opération O(1). Si la capacité doit être augmentée pour prendre en charge le nouvel élément, cette méthode devient une opération O(n), où n est Count.