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