<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.0.11-beta-23409" />

InvalidDataContractException

The exception that is thrown when the DataContractSerializer or NetDataContractSerializer encounters an invalid data contract during serialization and deserialization.

Initializes a new instance of the InvalidDataContractException class.

public InvalidDataContractException(string message)

Initializes a new instance of the InvalidDataContractException class with the specified error message.

public InvalidDataContractException(string message, Exception innerException)

Initializes a new instance of the InvalidDataContractException class with the specified error message and inner exception.