System::Collections::Generic::List::BinarySearch method

List::BinarySearch(const T&) const method

Looks for item in a sorted list.

int System::Collections::Generic::List<T>::BinarySearch(const T &item) const
ParameterTypeDescription
itemconst T&Item to look for.

ReturnValue

Index of the item in sorted list or complement of closest index.

See Also

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

Looks for item in a sorted list.

int System::Collections::Generic::List<T>::BinarySearch(const T &item, const SharedPtr<System::Collections::Generic::IComparer<T>> &comparer) const
ParameterTypeDescription
itemconst T&Item to look for.
comparerconst SharedPtr<System::Collections::Generic::IComparer<T>>&Comparer to use.

ReturnValue

Index of the item in sorted list or complement of closest index.

See Also

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

Looks for item in a sorted list.

int System::Collections::Generic::List<T>::BinarySearch(int index, int count, const T &item, const SharedPtr<System::Collections::Generic::IComparer<T>> &comparer) const
ParameterTypeDescription
indexintRange beginning.
countintRange size.
itemconst T&Item to look for.
comparerconst SharedPtr<System::Collections::Generic::IComparer<T>>&Comparer to use.

ReturnValue

Index of the item in sorted list or complement of closest index.

See Also