This documentation is archived and is not being maintained.

CookieContainer Constructor (Int32, Int32, Int32)

.NET Framework 1.1

Initializes a new instance of the CookieContainer class with specific properties.

[Visual Basic]
Public Sub New( _
   ByVal capacity As Integer, _
   ByVal perDomainCapacity As Integer, _
   ByVal maxCookieSize As Integer _
)
[C#]
public CookieContainer(
   int capacity,
 int perDomainCapacity,
 int maxCookieSize
);
[C++]
public: CookieContainer(
   int capacity,
 int perDomainCapacity,
 int maxCookieSize
);
[JScript]
public function CookieContainer(
   capacity : int,
 perDomainCapacity : int,
 maxCookieSize : int
);

Parameters

capacity
The number of Cookie instances the CookieContainer can hold.
perDomainCapacity
The number of Cookie instances per domain.
maxCookieSize
The maximum size in bytes for any single Cookie in a CookieContainer.

Exceptions

Exception Type Condition
ArgumentException perDomainCapacity is not equal to MaxValue

and

(perDomainCapacity is less than or equal to zero or perDomainCapacity is greater than capacity)

ArgumentException maxCookieSize is less than or equal to zero

Remarks

The parameters specify values for Capacity, MaxCookieSize, and PerDomainCapacity.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

CookieContainer Class | CookieContainer Members | System.Net Namespace | CookieContainer Constructor Overload List | Cookie | CookieCollection | CookieContainer | CookieException

Show: