CookieContainer.Count プロパティ

定義

Cookieが現在保持しているCookieContainer インスタンスの数を取得します。

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

プロパティ値

Cookieが現在保持しているCookieContainer インスタンスの数。 これは、すべてのドメイン内の Cookie インスタンスの合計です。

注釈

このプロパティの既定値は DefaultCookieLimit です。 Count Capacity以上の場合、1 つ以上のCookie インスタンスがコンテナーから削除されます。 次のように、 Count 以下の Capacity に持ち込むのに十分なインスタンスが削除されます。スコープ内のインスタンス Cookie 有効期限が切れている場合は、クリーンアップされます。 そうでない場合は、最も最近使用された CookieCollection が見つかり、コンテナーから削除されます。

適用対象

こちらもご覧ください