TableRowCollection.IList.IndexOf(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.
Recherche l’objet spécifié et retourne l’index de base zéro de la première occurrence dans la collection.
virtual int System.Collections.IList.IndexOf(System::Object ^ o) = System::Collections::IList::IndexOf;
int IList.IndexOf(object o);
abstract member System.Collections.IList.IndexOf : obj -> int
override this.System.Collections.IList.IndexOf : obj -> int
Function IndexOf (o As Object) As Integer Implements IList.IndexOf
Paramètres
- o
- Object
Objet à localiser dans la collection.
Retours
Index de base zéro de la première occurrence de l’objet dans la collection ; sinon, -1 si l’objet n’est pas dans la collection.
Implémente
Remarques
En règle générale, vous devez utiliser la GetRowIndex méthode pour obtenir l’index d’un élément dans un TableRowCollection objet.
La IList.IndexOf méthode est une implémentation explicite de membre d’interface. Elle ne peut être utilisée que lorsque l’instance TableRowCollection est convertie en IList interface.