System::Collections::Generic::List::BinarySearch metod

List::BinarySearch(const T&) const method

Söker efter objekt i en sorterad lista.

int System::Collections::Generic::List<T>::BinarySearch(const T &item) const
ParameterTypeBeskrivning
objektconst T&Objekt att söka efter.

ReturnValue

Index för objektet i den sorterade listan eller komplementet till närmaste index.

Se även

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

Söker efter objekt i en sorterad lista.

int System::Collections::Generic::List<T>::BinarySearch(const T &item, const SharedPtr<System::Collections::Generic::IComparer<T>> &comparer) const
ParameterTypeBeskrivning
objektconst T&Objekt att söka efter.
comparerconst SharedPtr<System::Collections::Generic::IComparer<T>>&Comparer att använda.

ReturnValue

Index för objektet i den sorterade listan eller komplementet till närmaste index.

Se även

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

Söker efter objekt i en sorterad lista.

int System::Collections::Generic::List<T>::BinarySearch(int index, int count, const T &item, const SharedPtr<System::Collections::Generic::IComparer<T>> &comparer) const
ParameterTypeBeskrivning
indexintIntervallstart.
countintIntervallstorlek.
objektconst T&Objekt att söka efter.
comparerconst SharedPtr<System::Collections::Generic::IComparer<T>>&Comparer att använda.

ReturnValue

Index för objektet i den sorterade listan eller komplementet till närmaste index.

Se även