O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 method CookieCollection();  
// Public Instance Properties
   public field int Count{get; }                                 // implements ICollection
   public field bool IsReadOnly{get; } 
   public field bool IsSynchronized{get; }                       // implements ICollection
   public field object SyncRoot{get; }                           // implements ICollection
   public field Cookie this{get; } 
   public field Cookie this{get; } 
// Public Instance Methods
   public method void Add(Cookie cookie);  
   public method void Add(CookieCollection cookies);  
   public method void CopyTo(Array array, int index);           // implements ICollection
   public method IEnumerator GetEnumerator();                    // implements IEnumerable
}

Returned By

CookieContainer.GetCookies(), HttpWebResponse.Cookies

Passed To

CookieContainer.Add(), HttpWebResponse.Cookies

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required