public static Cookie SetCookie(this CookieCollection Collection, String Name, String Value, String Path = "/", String Domain = "") { Cookie cook = new Cookie(Name, Value, Path, Domain); Collection.SetCookie(cook, Domain); return(cook); }
public static CookieCollection SetCookies(this CookieCollection Collection, CookieCollection Cookies, string Domain = "") { foreach (Cookie cook in Cookies) { Collection.SetCookie(cook, Domain); } return(Collection); }