## List::BinarySearch(const T\&) const method


Busca un elemento en una lista ordenada.

```cpp
int System::Collections::Generic::List<T>::BinarySearch(const T &item) const
```


| Parámetro | Tipo | Descripción |
| --- | --- | --- |
| elemento | const T\& | Elemento a buscar. |

### ReturnValue

[Index](../../../system/index/) of the item in sorted list or complement of closest index.

## Ver también

* Class [List](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
## List::BinarySearch(const T\&, const SharedPtr\<System::Collections::Generic::IComparer\<T\>\>\&) const method


Busca un elemento en una lista ordenada.

```cpp
int System::Collections::Generic::List<T>::BinarySearch(const T &item, const SharedPtr<System::Collections::Generic::IComparer<T>> &comparer) const
```


| Parámetro | Tipo | Descripción |
| --- | --- | --- |
| elemento | const T\& | Elemento a buscar. |
| comparer | const SharedPtr\<System::Collections::Generic::IComparer\<T\>\>\& | [Comparer](../../comparer/) para usar. |

### ReturnValue

[Index](../../../system/index/) of the item in sorted list or complement of closest index.

## Ver también

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [IComparer](../../icomparer/)
* Class [List](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
## List::BinarySearch(int, int, const T\&, const SharedPtr\<System::Collections::Generic::IComparer\<T\>\>\&) const method


Busca un elemento en una lista ordenada.

```cpp
int System::Collections::Generic::List<T>::BinarySearch(int index, int count, const T &item, const SharedPtr<System::Collections::Generic::IComparer<T>> &comparer) const
```


| Parámetro | Tipo | Descripción |
| --- | --- | --- |
| index | int | [Range](../../../system/range/) inicio. |
| count | int | [Range](../../../system/range/) tamaño. |
| elemento | const T\& | Elemento a buscar. |
| comparer | const SharedPtr\<System::Collections::Generic::IComparer\<T\>\>\& | [Comparer](../../comparer/) para usar. |

### ReturnValue

[Index](../../../system/index/) of the item in sorted list or complement of closest index.

## Ver también

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [IComparer](../../icomparer/)
* Class [List](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
