System::Collections::Generic::List::BinarySearch метод

List::BinarySearch(const T&) const method

Ищет элемент в отсортированном списке.

int System::Collections::Generic::List<T>::BinarySearch(const T &item) const
ПараметрТипОписание
элементconst T&Элемент для поиска.

ReturnValue

Индекс элемента в отсортированном списке или дополнение к ближайшему индексу.

См. также

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

Ищет элемент в отсортированном списке.

int System::Collections::Generic::List<T>::BinarySearch(const T &item, const SharedPtr<System::Collections::Generic::IComparer<T>> &comparer) const
ПараметрТипОписание
элементconst T&Элемент для поиска.
comparerconst SharedPtr<System::Collections::Generic::IComparer<T>>&Comparer для использования.

ReturnValue

Индекс элемента в отсортированном списке или дополнение к ближайшему индексу.

См. также

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

Ищет элемент в отсортированном списке.

int System::Collections::Generic::List<T>::BinarySearch(int index, int count, const T &item, const SharedPtr<System::Collections::Generic::IComparer<T>> &comparer) const
ПараметрТипОписание
индексintНачало диапазона.
countintРазмер диапазона.
элементconst T&Элемент для поиска.
comparerconst SharedPtr<System::Collections::Generic::IComparer<T>>&Comparer для использования.

ReturnValue

Индекс элемента в отсортированном списке или дополнение к ближайшему индексу.

См. также