HttpCookieCollection.Remove(String) 方法

定義

從集合中移除指定名稱的 cookie。

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

參數

name
String

要從收藏中移除的餅乾名稱。

範例

以下範例將 cookie 從集合中移除。

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

備註

若集合中不存在包含該 name Cookie 的 cookie,則不會拋出例外。

適用於

另請參閱