Uredi

Deli z drugimi prek


CookieContainer.PerDomainCapacity Property

Definition

Gets or sets the number of Cookie instances that a CookieContainer can hold per domain.

public:
 property int PerDomainCapacity { int get(); void set(int value); };
public:
 property int PerDomainCapacity { int get(); };
public int PerDomainCapacity { get; set; }
public int PerDomainCapacity { get; }
member this.PerDomainCapacity : int with get, set
member this.PerDomainCapacity : int
Public Property PerDomainCapacity As Integer
Public ReadOnly Property PerDomainCapacity As Integer

Property Value

The number of Cookie instances that are allowed per domain.

Exceptions

PerDomainCapacity is less than or equal to zero.

-or-

(PerDomainCapacity is greater than the maximum allowable number of cookies instances, 300, and is not equal to Int32.MaxValue).

Remarks

If the new PerDomainCapacity value is less than the current value, and if any of the domain collections contain more Cookie instances than the new value, the collections are pruned to fit. This uses the same basic rules as described in the Capacity property. However, this does the clean-up only on the collection for this domain.

Applies to

See also