System.Net.CookieContainer.Capacity Property

Gets and sets the number of System.Net.Cookie instances that a System.Net.CookieContainer can hold.

Syntax

public int Capacity { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

If CookieContainer.Count equals or exceeds CookieContainer.Capacity, one or more System.Net.Cookie instances are removed from the container. Enough instances are removed to bring CookieContainer.Count below CookieContainer.Capacity as follows: if there are expired System.Net.Cookie instances in scope, they are cleaned up. If not, then the least recently used System.Net.CookieCollection is found and removed from the container.

CookieContainer.Capacity must be greater than or equal to CookieContainer.PerDomainCapacity.

Requirements

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