Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CookieContainer Constructor (Int32)

 

Initializes a new instance of the CookieContainer class with a specified value for the number of Cookie instances that the container can hold.

Namespace:   System.Net
Assembly:  System (in System.dll)

public:
CookieContainer(
	int capacity
)

Parameters

capacity
Type: System::Int32

The number of Cookie instances that the CookieContainer can hold.

Exception Condition
ArgumentException

capacity is less than or equal to zero.

PerDomainCapacity is initialized to 20, and MaxCookieSize is initialized to 4096.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft