## CookieCollection::IndexOf method


返回指定 cookie 的索引。

```cpp
int32_t System::Net::CookieCollection::IndexOf(System::SharedPtr<Cookie> cookie)
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| cookie | System::SharedPtr\<Cookie\> | 要搜索的 cookie。 |

### ReturnValue

如果找到指定的 cookie，则返回其索引；否则返回 -1。

## 另见

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Cookie](../../cookie/)
* Class [CookieCollection](../)
* Namespace [System::Net](../../)
* Library [Aspose.Page for C++](../../../)
