Редагувати

Поділитися через


CookieContainer Constructors

Definition

Initializes a new instance of the CookieContainer class.

Overloads

CookieContainer()

Initializes a new instance of the CookieContainer class.

CookieContainer(Int32)

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

CookieContainer(Int32, Int32, Int32)

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

CookieContainer()

Source:
CookieContainer.cs
Source:
CookieContainer.cs
Source:
CookieContainer.cs

Initializes a new instance of the CookieContainer class.

public:
 CookieContainer();
public CookieContainer ();
Public Sub New ()

Remarks

The parameterless constructor initializes all fields to their default values. DefaultCookieLimit is used to initialize Capacity, DefaultCookieLengthLimit is used for MaxCookieSize, and DefaultPerDomainCookieLimit is used for PerDomainCapacity.

See also

Applies to

CookieContainer(Int32)

Source:
CookieContainer.cs
Source:
CookieContainer.cs
Source:
CookieContainer.cs

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

public:
 CookieContainer(int capacity);
public CookieContainer (int capacity);
new System.Net.CookieContainer : int -> System.Net.CookieContainer
Public Sub New (capacity As Integer)

Parameters

capacity
Int32

The number of Cookie instances that the CookieContainer can hold.

Exceptions

capacity is less than or equal to zero.

Remarks

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

See also

Applies to

CookieContainer(Int32, Int32, Int32)

Source:
CookieContainer.cs
Source:
CookieContainer.cs
Source:
CookieContainer.cs

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

public:
 CookieContainer(int capacity, int perDomainCapacity, int maxCookieSize);
public CookieContainer (int capacity, int perDomainCapacity, int maxCookieSize);
new System.Net.CookieContainer : int * int * int -> System.Net.CookieContainer
Public Sub New (capacity As Integer, perDomainCapacity As Integer, maxCookieSize As Integer)

Parameters

capacity
Int32

The number of Cookie instances that the CookieContainer can hold.

perDomainCapacity
Int32

The number of Cookie instances per domain.

maxCookieSize
Int32

The maximum size in bytes for any single Cookie in a CookieContainer.

Exceptions

perDomainCapacity is not equal to Int32.MaxValue.

and

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

maxCookieSize is less than or equal to zero.

Remarks

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

See also

Applies to