System.Net (system.dll)class

This class is a container that holds cookies and organizes them by URI. You can add a Cookie or CookieCollection to a container using the simplest forms of the Add( ) method, or you can use the forms of the Add( ) method that take a System.Uri argument. You can retrieve all the cookies for a given URI using the GetCookies( ) method.

public class CookieContainer {
// Public Constructors
   public CookieContainer( );
   public CookieContainer(int capacity);
   public CookieContainer(int capacity, int perDomainCapacity, int maxCookieSize);
// Public Static Fields
   public const int DefaultCookieLengthLimit;         
// =4096
   public const int DefaultCookieLimit;  
// =300
   public const int DefaultPerDomainCookieLimit;      
// =20
// Public Instance Properties
   public int Capacity{set; get; }
   public int Count{get; }
   public int MaxCookieSize{set; get; }
   public int PerDomainCapacity{set; get; }
// Public Instance Methods
   public void Add(Cookie cookie);
   public void Add(CookieCollection cookies);
   public void Add(Uri uri, Cookie cookie);
   public void Add(Uri uri, CookieCollection cookies);
   public string GetCookieHeader(Uri uri);
   public CookieCollection GetCookies(Uri uri);
   public void SetCookies(Uri uri, string cookieHeader);

Returned By


Passed To


    Part II: Programming with the .NET Framework
    Part IV: API Quick Reference
    Chapter 26. System