## CookieCollection::IndexOf method


Returns an index of the specified cookie.

```cpp
int32_t System::Net::CookieCollection::IndexOf(System::SharedPtr<Cookie> cookie)
```


| Parameter | Type | Description |
| --- | --- | --- |
| cookie | System::SharedPtr\<Cookie\> | The cookie to search for. |

### ReturnValue

An index of the specified cookie if it's found, otherwise -1.

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Cookie](../../cookie/)
* Class [CookieCollection](../)
* Namespace [System::Net](../../)
* Library [Aspose.PDF for C++](../../../)
