## List::IndexOf(const T\&) const method


Gets first index of specific item.

```cpp
int System::Collections::Generic::List<T>::IndexOf(const T &item) const override
```


| Parameter | Type | Description |
| --- | --- | --- |
| item | const T\& | Item to look for. |

### ReturnValue

[Index](../../../system/index/) of first occurance of specified item or -1 if not found.

## See Also

* Class [List](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
## List::IndexOf(const T\&, int) const method


Looks for specific item in list.

```cpp
int System::Collections::Generic::List<T>::IndexOf(const T &item, int index) const
```


| Parameter | Type | Description |
| --- | --- | --- |
| item | const T\& | Item to look for. |
| index | int | [Index](../../../system/index/) to start lookup at. |

### ReturnValue

[Index](../../../system/index/) of first instance of specified item or -1 if not found.

## See Also

* Class [List](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
