HttpCookieCollection.Remove(String) HttpCookieCollection.Remove(String) HttpCookieCollection.Remove(String) HttpCookieCollection.Remove(String) Method

定義

以指定名稱從集合移除 Cookie。Removes the cookie with the specified name from the collection.

public:
 void Remove(System::String ^ name);
public void Remove (string name);
member this.Remove : string -> unit
Public Sub Remove (name As String)

參數

name
String String String String

要從集合移除的 Cookie 名稱。The name of the cookie to remove from the collection.

範例

下列範例會從集合移除 cookie。The following example removes a cookie from the collection.

MyCookieCollection.Remove(MyCookie);
    
MyCookieCollection.Remove(MyCookie)
    

備註

如果具有指定 cookiename不在集合中,會擲回任何例外狀況。If a cookie with the specified name does not exist in the collection, no exception is thrown.

適用於

另請參閱