InvalidDataContractException 建構函式

定義

初始化 InvalidDataContractException 類別的新執行個體。Initializes a new instance of the InvalidDataContractException class.

多載

InvalidDataContractException()

初始化 InvalidDataContractException 類別的新執行個體。Initializes a new instance of the InvalidDataContractException class.

InvalidDataContractException(String)

使用指定的錯誤訊息,初始化 InvalidDataContractException 類別的新執行個體。Initializes a new instance of the InvalidDataContractException class with the specified error message.

InvalidDataContractException(SerializationInfo, StreamingContext)

使用指定的 InvalidDataContractExceptionSerializationInfo,初始化 StreamingContext 類別的新執行個體。Initializes a new instance of the InvalidDataContractException class with the specified SerializationInfo and StreamingContext.

InvalidDataContractException(String, Exception)

使用指定的錯誤訊息和內部例外狀況,初始化 InvalidDataContractException 類別的新執行個體。Initializes a new instance of the InvalidDataContractException class with the specified error message and inner exception.

InvalidDataContractException()

初始化 InvalidDataContractException 類別的新執行個體。Initializes a new instance of the InvalidDataContractException class.

public:
 InvalidDataContractException();
public InvalidDataContractException ();
Public Sub New ()

InvalidDataContractException(String)

使用指定的錯誤訊息,初始化 InvalidDataContractException 類別的新執行個體。Initializes a new instance of the InvalidDataContractException class with the specified error message.

public:
 InvalidDataContractException(System::String ^ message);
public InvalidDataContractException (string message);
new System.Runtime.Serialization.InvalidDataContractException : string -> System.Runtime.Serialization.InvalidDataContractException
Public Sub New (message As String)

參數

message
String

錯誤的描述。A description of the error.

InvalidDataContractException(SerializationInfo, StreamingContext)

使用指定的 InvalidDataContractExceptionSerializationInfo,初始化 StreamingContext 類別的新執行個體。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);
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)

參數

info
SerializationInfo

SerializationInfo,其中包含序列化和還原序列化物件時所需的資料。A SerializationInfo that contains data needed to serialize and deserialize an object.

context
StreamingContext

StreamingContext,指定序列化和還原序列化期間的使用者內容。A StreamingContext that specifies user context during serialization and deserialization.

備註

System.Runtime.Serialization 命名空間內的一個格式子 (Formatter) 會在還原序列化期間使用這個建構函式 (Constructor)。This constructor is used in deserialization by one of the formatters in the System.Runtime.Serialization namespace.

InvalidDataContractException(String, Exception)

使用指定的錯誤訊息和內部例外狀況,初始化 InvalidDataContractException 類別的新執行個體。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);
new System.Runtime.Serialization.InvalidDataContractException : string * Exception -> System.Runtime.Serialization.InvalidDataContractException
Public Sub New (message As String, innerException As Exception)

參數

message
String

錯誤的描述。A description of the error.

innerException
Exception

原始的 ExceptionThe original Exception.

適用於