ItemCollection.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 à ItemCollection.
public:
virtual int Add(System::Object ^ newItem);
public int Add(object newItem);
abstract member Add : obj -> int
override this.Add : obj -> int
Public Function Add (newItem As Object) As Integer
Paramètres
- newItem
- Object
Élément à ajouter à la collection.
Retours
L'index de base zéro auquel l'objet est ajouté ou -1 si l'élément ne peut pas être ajouté.
Implémente
Exceptions
La collection est en mode ItemsSource.