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


Получает первый индекс указанного элемента.

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


| Параметр | Тип | Описание |
| --- | --- | --- |
| элемент | const T\& | Элемент для поиска. |

### ReturnValue

[Index](../../../system/index/) of first occurance of specified item or -1 if not found.

## См. также

* Class [List](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
## List::IndexOf(const T\&, int) const method


Ищет указанный элемент в списке.

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


| Параметр | Тип | Описание |
| --- | --- | --- |
| элемент | const T\& | Элемент для поиска. |
| index | int | [Индекс](../../../system/index/) для начала поиска. |

### ReturnValue

[Index](../../../system/index/) of first instance of specified item or -1 if not found.

## См. также

* Class [List](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
