CookieContainer Constructors
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the CookieContainer class.
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. |
- 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
.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 |
- 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
.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 |
- 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.
- 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 |
.NET-visszajelzés
A(z) .NET egy nyílt forráskód projekt. Visszajelzés adásához válasszon egy hivatkozást: