InvalidDataContractException 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 InvalidDataContractException class.
InvalidDataContractException() |
Initializes a new instance of the InvalidDataContractException class. |
InvalidDataContractException(String) |
Initializes a new instance of the InvalidDataContractException class with the specified error message. |
InvalidDataContractException(SerializationInfo, StreamingContext) |
Obsolete.
Initializes a new instance of the InvalidDataContractException class with the specified SerializationInfo and StreamingContext. |
InvalidDataContractException(String, Exception) |
Initializes a new instance of the InvalidDataContractException class with the specified error message and inner exception. |
Initializes a new instance of the InvalidDataContractException class.
public:
InvalidDataContractException();
public InvalidDataContractException ();
Public Sub New ()
Applies to
.NET 9 and other versions
Product | Versions |
---|---|
.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 | 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 |
UWP | 10.0 |
Initializes a new instance of the InvalidDataContractException class with the specified error message.
public:
InvalidDataContractException(System::String ^ message);
public InvalidDataContractException (string message);
public InvalidDataContractException (string? message);
new System.Runtime.Serialization.InvalidDataContractException : string -> System.Runtime.Serialization.InvalidDataContractException
Public Sub New (message As String)
Parameters
- message
- String
A description of the error.
Applies to
.NET 9 and other versions
Product | Versions |
---|---|
.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 | 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 |
UWP | 10.0 |
Caution
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
Initializes a new instance of the InvalidDataContractException class with the specified SerializationInfo and StreamingContext.
protected:
InvalidDataContractException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected InvalidDataContractException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[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 InvalidDataContractException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Runtime.Serialization.InvalidDataContractException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Runtime.Serialization.InvalidDataContractException
[<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.Runtime.Serialization.InvalidDataContractException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Runtime.Serialization.InvalidDataContractException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
Parameters
- info
- SerializationInfo
A SerializationInfo that contains data needed to serialize and deserialize an object.
- context
- StreamingContext
A StreamingContext that specifies user context during serialization and deserialization.
- Attributes
Remarks
This constructor is used in deserialization by one of the formatters in the System.Runtime.Serialization namespace.
Applies to
.NET 9 and other versions
Product | Versions (Obsolete) |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7 (8, 9) |
.NET Framework | 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 |
Initializes a new instance of the InvalidDataContractException class with the specified error message and inner exception.
public:
InvalidDataContractException(System::String ^ message, Exception ^ innerException);
public InvalidDataContractException (string message, Exception innerException);
public InvalidDataContractException (string? message, Exception? innerException);
new System.Runtime.Serialization.InvalidDataContractException : string * Exception -> System.Runtime.Serialization.InvalidDataContractException
Public Sub New (message As String, innerException As Exception)
Parameters
- message
- String
A description of the error.
Applies to
.NET 9 and other versions
Product | Versions |
---|---|
.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 | 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 |
UWP | 10.0 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: