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