System::Array::BinarySearch method

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

Esegue una ricerca binaria nell’array ordinato.

static int System::Array<T>::BinarySearch(System::ArrayPtr<T> arr, const T &item)
ParametroTipoDescrizione
arrSystem::ArrayPtr<T>Array ordinato in cui eseguire la ricerca
elementoconst T&Un elemento da cercare

ReturnValue

Indice dell’elemento cercato se trovato, altrimenti un intero negativo che è il complemento a livello di bit dell’indice del prossimo elemento maggiore dell’elemento cercato o, se non esiste un elemento maggiore, il complemento a livello di bit del numero di elementi nell’array.

Vedi anche

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

NON IMPLEMENTATO.

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)

Vedi anche