CookieContainer.Count CookieContainer.Count CookieContainer.Count CookieContainer.Count Property

定義

取得 Cookie 目前保留的 CookieContainer 執行個體數目。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

屬性值

Cookie 目前保留的 CookieContainer 執行個體數目。The number of Cookie instances that a CookieContainer currently holds. 這是所有網域中 Cookie 執行個體的總和。This is the total of Cookie instances in all domains.

備註

此屬性的預設值為 DefaultCookieLimitThe default value of this property is DefaultCookieLimit. 如果Count等於或超過Capacity,則會從Cookie容器中移除一或多個實例。If Count equals or exceeds Capacity, one or more Cookie instances are removed from the container. 已移除Count Capacity足夠的實例,如下所示:如果範圍內有Cookie過期的實例,則會清除它們。Enough instances are removed to bring Count below Capacity as follows: if there are expired Cookie instances in scope, they are cleaned up. 如果沒有,則會找到最近使用CookieCollection的最少,並從容器中移除。If not, then the least recently used CookieCollection is found and removed from the container.

適用於

另請參閱