## StringCollection::IndexOf method


在容器中查找特定字符串。

```cpp
int System::Collections::Specialized::StringCollection::IndexOf(const System::String &value) const
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| value | const System::String\& | [String](../../../system/string/) 要查找的字符串。 |

### ReturnValue

指定字符串首次出现的索引，如果未找到则返回 -1。

## 另见

* Class [String](../../../system/string/)
* Class [StringCollection](../)
* Namespace [System::Collections::Specialized](../../)
* Library [Aspose.Font for C++](../../../)
