System::Array::BinarySearch méthode

Array::BinarySearch(System::ArrayPtr<T>, const T&) method

Effectue une recherche binaire dans le tableau trié.

static int System::Array<T>::BinarySearch(System::ArrayPtr<T> arr, const T &item)
ParamètreTypeDescription
arrSystem::ArrayPtr<T>Tableau trié dans lequel effectuer la recherche
élémentconst T&Un élément à rechercher

ReturnValue

Indice de l’élément recherché s’il est trouvé, sinon un entier négatif qui est le complément à un de l’indice de l’élément suivant plus grand que l’élément recherché ou, s’il n’existe aucun élément plus grand, le complément à un du nombre d’éléments du tableau.

Voir aussi

Array::BinarySearch(System::ArrayPtr<T>, const Y&, const SharedPtr<Collections::Generic::IComparer<Z>>&) method

NON IMPLEMENTÉ.

template<typename Y,typename Z> static int System::Array<T>::BinarySearch(System::ArrayPtr<T> arr, const Y &item, const SharedPtr<Collections::Generic::IComparer<Z>> &comparer)

Voir aussi