Name
CookieCollection
Synopsis
This class is a specialized collection for
holding cookies.
It’s used by HttpWebResponse
to
represent a set of cookies returned by a server. By default, the
IsReadOnly
property is set to
true
.
public class CookieCollection : ICollection, IEnumerable { // Public Constructors public CookieCollection( ); // Public Instance Properties public int Count{get; } // implements ICollection public bool IsReadOnly{get; } public bool IsSynchronized{get; } // implements ICollection public object SyncRoot{get; } // implements ICollection public Cookie this[intindex
]{get; } public Cookie this[stringname
]{get; } // Public Instance Methods public void Add(Cookiecookie
); public void Add(CookieCollectioncookies
); public void CopyTo(Arrayarray
, intindex
); // implements ICollection public IEnumerator GetEnumerator( ); // implements IEnumerable }
Returned By
CookieContainer.GetCookies( )
,
HttpWebResponse.Cookies
Passed To
CookieContainer.Add( )
,
HttpWebResponse.Cookies
Get C# in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.