Bewerken

Share via


CookieContainer.Count Property

Definition

Gets the number of Cookie instances that a CookieContainer currently holds.

public:
 property int Count { int get(); };
public int Count { get; }
member this.Count : int
Public ReadOnly Property Count As Integer

Property Value

The number of Cookie instances that a CookieContainer currently holds. This is the total of Cookie instances in all domains.

Remarks

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

Applies to

See also