Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


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 ();

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

.NET 9 és más verziók
Termék Verziók
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

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);

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

.NET 9 és más verziók
Termék Verziók
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

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);

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

.NET 9 és más verziók
Termék Verziók
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1