Méthode System::Collections::Generic::List::BinarySearch

List::BinarySearch(const T&) const method

Recherche un élément dans une liste triée.

int System::Collections::Generic::List<T>::BinarySearch(const T &item) const
ParamètreTypeDescription
élémentconst T&Élément à rechercher.

ReturnValue

Indice de l’élément dans la liste triée ou complément de l’indice le plus proche.

Voir aussi

List::BinarySearch(const T&, const SharedPtr<System::Collections::Generic::IComparer<T>>&) const method

Recherche un élément dans une liste triée.

int System::Collections::Generic::List<T>::BinarySearch(const T &item, const SharedPtr<System::Collections::Generic::IComparer<T>> &comparer) const
ParamètreTypeDescription
élémentconst T&Élément à rechercher.
comparerconst SharedPtr<System::Collections::Generic::IComparer<T>>&Comparer à utiliser.

ReturnValue

Indice de l’élément dans la liste triée ou complément de l’indice le plus proche.

Voir aussi

List::BinarySearch(int, int, const T&, const SharedPtr<System::Collections::Generic::IComparer<T>>&) const method

Recherche un élément dans une liste triée.

int System::Collections::Generic::List<T>::BinarySearch(int index, int count, const T &item, const SharedPtr<System::Collections::Generic::IComparer<T>> &comparer) const
ParamètreTypeDescription
indiceintDébut de la plage.
countintTaille de la plage.
élémentconst T&Élément à rechercher.
comparerconst SharedPtr<System::Collections::Generic::IComparer<T>>&Comparer à utiliser.

ReturnValue

Indice de l’élément dans la liste triée ou complément de l’indice le plus proche.

Voir aussi