CookieException Constructors 
Definition
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 CookieException class.
Overloads
| CookieException() | 
						 Initializes a new instance of the CookieException class.  | 
        	
| CookieException(String) | 
						 Initializes a new instance of the CookieException class with the specified error message.  | 
        	
| CookieException(SerializationInfo, StreamingContext) | 
							 
		Obsolete.
	 
Initializes a new instance of the CookieException class with specific values of   | 
        	
| CookieException(String, Exception) | 
						 Initializes a new instance of the CookieException class with the specified error message and a reference to the inner exception that is the cause of this exception.  | 
        	
CookieException()
- Source:
 - CookieException.cs
 
- Source:
 - CookieException.cs
 
- Source:
 - CookieException.cs
 
- Source:
 - CookieException.cs
 
Initializes a new instance of the CookieException class.
public:
 CookieException();
	public CookieException();
	Public Sub New ()
    	Remarks
The parameterless constructor for CookieException.
See also
Applies to
CookieException(String)
- Source:
 - CookieException.cs
 
Initializes a new instance of the CookieException class with the specified error message.
public:
 CookieException(System::String ^ message);
	public CookieException(string? message);
	new System.Net.CookieException : string -> System.Net.CookieException
	Public Sub New (message As String)
	Parameters
Applies to
CookieException(SerializationInfo, StreamingContext)
- Source:
 - CookieException.cs
 
- Source:
 - CookieException.cs
 
- Source:
 - CookieException.cs
 
- Source:
 - CookieException.cs
 
Caution
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
Initializes a new instance of the CookieException class with specific values of serializationInfo and streamingContext.
protected:
 CookieException(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
	[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected CookieException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
	protected CookieException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
	[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Net.CookieException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.CookieException
	new System.Net.CookieException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.CookieException
	Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)
	Parameters
- serializationInfo
 - SerializationInfo
 
The SerializationInfo to be used.
- streamingContext
 - StreamingContext
 
The StreamingContext to be used.
- Attributes
 
Remarks
Allows you to set up custom serialization.
See also
Applies to
CookieException(String, Exception)
- Source:
 - CookieException.cs
 
Initializes a new instance of the CookieException class with the specified error message and a reference to the inner exception that is the cause of this exception.
public:
 CookieException(System::String ^ message, Exception ^ innerException);
	public CookieException(string? message, Exception? innerException);
	new System.Net.CookieException : string * Exception -> System.Net.CookieException
	Public Sub New (message As String, innerException As Exception)
	Parameters
- innerException
 - Exception
 
The exception that is the cause of the current exception.