## CookieContainer::Add(System::SharedPtr\<Cookie\>) method


Lägger till en cookie i samlingen.

```cpp
void System::Net::CookieContainer::Add(System::SharedPtr<Cookie> cookie)
```


| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| cookie | System::SharedPtr\<Cookie\> | Cookien att lägga till. |

## Se även

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Cookie](../../cookie/)
* Class [CookieContainer](../)
* Namespace [System::Net](../../)
* Library [Aspose.PDF for C++](../../../)
## CookieContainer::Add(System::SharedPtr\<Cookie\>, bool) method


Lägger till en cookie i samlingen.

```cpp
void System::Net::CookieContainer::Add(System::SharedPtr<Cookie> cookie, bool throwOnError)
```


| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| cookie | System::SharedPtr\<Cookie\> | Cookien att lägga till. |
| throwOnError | bool | Ett värde som indikerar om ett undantag kommer att kastas när ett fel inträffar. |

## Se även

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Cookie](../../cookie/)
* Class [CookieContainer](../)
* Namespace [System::Net](../../)
* Library [Aspose.PDF for C++](../../../)
## CookieContainer::Add(System::SharedPtr\<CookieCollection\>) method


Kopierar cookies från den angivna samlingen till den aktuella.

```cpp
void System::Net::CookieContainer::Add(System::SharedPtr<CookieCollection> cookies)
```


| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| cookies | System::SharedPtr\<CookieCollection\> | Samlingen från vilken cookies kommer att kopieras. |

## Se även

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [CookieCollection](../../cookiecollection/)
* Class [CookieContainer](../)
* Namespace [System::Net](../../)
* Library [Aspose.PDF for C++](../../../)
## CookieContainer::Add(System::SharedPtr\<Uri\>, System::SharedPtr\<Cookie\>) method


Lägger till en cookie för den angivna URI:n.

```cpp
void System::Net::CookieContainer::Add(System::SharedPtr<Uri> uri, System::SharedPtr<Cookie> cookie)
```


| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| uri | System::SharedPtr\<Uri\> | En URI för cookien. |
| cookie | System::SharedPtr\<Cookie\> | Cookien att lägga till. |

## Se även

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Uri](../../../system/uri/)
* Class [Cookie](../../cookie/)
* Class [CookieContainer](../)
* Namespace [System::Net](../../)
* Library [Aspose.PDF for C++](../../../)
## CookieContainer::Add(System::SharedPtr\<Uri\>, System::SharedPtr\<CookieCollection\>) method


Kopierar cookies från den angivna samlingen för den angivna URI:n till den aktuella samlingen.

```cpp
void System::Net::CookieContainer::Add(System::SharedPtr<Uri> uri, System::SharedPtr<CookieCollection> cookies)
```


| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| uri | System::SharedPtr\<Uri\> | En URI för cookien. |
| cookies | System::SharedPtr\<CookieCollection\> | En kakkollektion från vilken kakor måste kopieras. |

## Se även

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Uri](../../../system/uri/)
* Class [CookieCollection](../../cookiecollection/)
* Class [CookieContainer](../)
* Namespace [System::Net](../../)
* Library [Aspose.PDF for C++](../../../)
