## Collection::IndexOf method


在集合中查找元素。

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


| Parameter | Type | 描述 |
| --- | --- | --- |
| item | const T\& | 要查找的项。 |

### ReturnValue

指定项首次出现的索引，如果未找到则为 -1。

## 另见

* Class [Collection](../)
* Namespace [System::Collections::ObjectModel](../../)
* Library [Aspose.Page for C++](../../../)
