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


Söker efter objekt i en sorterad lista.

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


| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| objekt | const T\& | Objekt att söka efter. |

### ReturnValue

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

## Se även

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


Söker efter objekt i en sorterad lista.

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


| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| objekt | const T\& | Objekt att söka efter. |
| comparer | const SharedPtr\<System::Collections::Generic::IComparer\<T\>\>\& | [Comparer](../../comparer/) att använda. |

### ReturnValue

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

## Se även

* 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


Söker efter objekt i en sorterad lista.

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


| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| index | int | [Range](../../../system/range/) början. |
| count | int | [Range](../../../system/range/) storlek. |
| objekt | const T\& | Objekt att söka efter. |
| comparer | const SharedPtr\<System::Collections::Generic::IComparer\<T\>\>\& | [Comparer](../../comparer/) att använda. |

### ReturnValue

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

## Se även

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