System.Net.CookieContainer.Add Method

Adds the contents of a System.Net.CookieCollection to the System.Net.CookieContainer.

Syntax

public void Add (CookieCollection cookies)

Parameters

cookies
The System.Net.CookieCollection to be added to the System.Net.CookieContainer.

Remarks

If the CookieContainer.Count property equals the CookieContainer.Capacity property, one or more System.Net.Cookie instances are removed from the container before adding the contents of the cookies parameter. Enough System.Net.Cookie instances are removed to make room for cookies as follows: if there are expired instances, they are cleaned up. If not, or if more room is needed, then the least recently used System.Net.CookieCollection is found and removed from the container.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0