CookieCollection.Add 方法

定义

Cookie 添加到 CookieCollectionAdds a Cookie to a CookieCollection.

重载

Add(Cookie)

Cookie 添加到 CookieCollectionAdds a Cookie to a CookieCollection.

Add(CookieCollection)

CookieCollection 的内容添加到当前实例中。Adds the contents of a CookieCollection to the current instance.

Cookie 添加到 CookieCollectionAdds a Cookie to a CookieCollection.

public:
 virtual void Add(System::Net::Cookie ^ cookie);
public void Add (System.Net.Cookie cookie);
abstract member Add : System.Net.Cookie -> unit
override this.Add : System.Net.Cookie -> unit

参数

cookie
Cookie

要添加到 Cookie 中的 CookieCollectionThe Cookie to be added to a CookieCollection.

异常

cookienullcookie is null.

另请参阅

Add(CookieCollection)

CookieCollection 的内容添加到当前实例中。Adds the contents of a CookieCollection to the current instance.

public:
 void Add(System::Net::CookieCollection ^ cookies);
public void Add (System.Net.CookieCollection cookies);
member this.Add : System.Net.CookieCollection -> unit
Public Sub Add (cookies As CookieCollection)

参数

cookies
CookieCollection

要添加的 CookieCollectionThe CookieCollection to be added.

异常

cookiesnullcookies is null.

注解

CookieCookieCollectioncookies从参数读取并添加到当前实例中。Each Cookie is read from the CookieCollectioncookies parameter and added to the current instance.

另请参阅

适用于