InvalidDataContractException 构造函数

定义

初始化 InvalidDataContractException 类的新实例。

重载

InvalidDataContractException()

初始化 InvalidDataContractException 类的新实例。

InvalidDataContractException(String)

使用指定的错误消息初始化 InvalidDataContractException 类的新实例。

InvalidDataContractException(SerializationInfo, StreamingContext)
已过时.

使用指定的 InvalidDataContractExceptionSerializationInfo 初始化 StreamingContext 类的新实例。

InvalidDataContractException(String, Exception)

使用指定的错误消息和内部异常初始化 InvalidDataContractException 类的新实例。

InvalidDataContractException()

Source:
InvalidDataContractException.cs
Source:
InvalidDataContractException.cs
Source:
InvalidDataContractException.cs

初始化 InvalidDataContractException 类的新实例。

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

适用于

InvalidDataContractException(String)

Source:
InvalidDataContractException.cs
Source:
InvalidDataContractException.cs
Source:
InvalidDataContractException.cs

使用指定的错误消息初始化 InvalidDataContractException 类的新实例。

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)

参数

message
String

对错误的说明。

适用于

InvalidDataContractException(SerializationInfo, StreamingContext)

Source:
InvalidDataContractException.cs
Source:
InvalidDataContractException.cs
Source:
InvalidDataContractException.cs

注意

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

使用指定的 InvalidDataContractExceptionSerializationInfo 初始化 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)

参数

info
SerializationInfo

一个 SerializationInfo,它包含序列化和反序列化对象所需的数据。

context
StreamingContext

StreamingContext,它指定序列化和反序列化过程中的用户上下文。

属性

注解

此构造函数由 System.Runtime.Serialization 命名空间中的格式化程序之一在反序列化过程中使用。

适用于

InvalidDataContractException(String, Exception)

Source:
InvalidDataContractException.cs
Source:
InvalidDataContractException.cs
Source:
InvalidDataContractException.cs

使用指定的错误消息和内部异常初始化 InvalidDataContractException 类的新实例。

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)

参数

message
String

对错误的说明。

innerException
Exception

原始 Exception

适用于