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

已排序列表中项的索引,或最近索引的补数。

另见