## Collection::IndexOf method


Looks for element in collection.

```cpp
int System::Collections::ObjectModel::Collection<T>::IndexOf(const T &item) const override
```


| Parameter | Type | Description |
| --- | --- | --- |
| item | const T\& | Item to look for. |

### ReturnValue

[Index](../../../system/index/) of first occurrence of specified item or -1 if not found.

## See Also

* Class [Collection](../)
* Namespace [System::Collections::ObjectModel](../../)
* Library [Aspose.PDF for C++](../../../)
