System::Collections::Generic::List::IndexOf 方法
List::IndexOf(const T&) const method
获取特定项的第一个索引。
int System::Collections::Generic::List<T>::IndexOf(const T &item) const override
| Parameter | Type | 描述 |
|---|---|---|
| item | const T& | 要查找的项。 |
ReturnValue
指定项首次出现的索引,如果未找到则为 -1。
另见
- Class List
- Namespace System::Collections::Generic
- Library Aspose.Page for C++
List::IndexOf(const T&, int) const method
在列表中查找特定项。
int System::Collections::Generic::List<T>::IndexOf(const T &item, int index) const
| Parameter | Type | 描述 |
|---|---|---|
| item | const T& | 要查找的项。 |
| 索引 | int | 开始查找的索引。 |
ReturnValue
指定项首次出现的实例索引,如果未找到则为 -1。
另见
- Class List
- Namespace System::Collections::Generic
- Library Aspose.Page for C++