ProtocolViolationException 构造函数

定义

初始化 ProtocolViolationException 类的新实例。

重载

ProtocolViolationException()

初始化 ProtocolViolationException 类的新实例。

ProtocolViolationException(String)

使用指定的消息初始化 ProtocolViolationException 类的新实例。

ProtocolViolationException(SerializationInfo, StreamingContext)
已过时.

根据指定的 SerializationInfoStreamingContext 实例初始化 ProtocolViolationException 类的新实例。

ProtocolViolationException()

Source:
ProtocolViolationException.cs
Source:
ProtocolViolationException.cs
Source:
ProtocolViolationException.cs

初始化 ProtocolViolationException 类的新实例。

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

注解

属性 Message 初始化为系统提供的消息,用于描述错误。 将 InnerException 属性初始化为 null

适用于

ProtocolViolationException(String)

Source:
ProtocolViolationException.cs
Source:
ProtocolViolationException.cs
Source:
ProtocolViolationException.cs

使用指定的消息初始化 ProtocolViolationException 类的新实例。

public:
 ProtocolViolationException(System::String ^ message);
public ProtocolViolationException (string message);
public ProtocolViolationException (string? message);
new System.Net.ProtocolViolationException : string -> System.Net.ProtocolViolationException
Public Sub New (message As String)

参数

message
String

错误消息字符串。

注解

此构造函数初始化 类的新实例 ProtocolViolationException ,并将 Message 属性设置为 参数的值 message 。 如果 message 为空引用,则 Message 属性初始化为系统提供的消息。 将 InnerException 属性初始化为 null

适用于

ProtocolViolationException(SerializationInfo, StreamingContext)

Source:
ProtocolViolationException.cs
Source:
ProtocolViolationException.cs
Source:
ProtocolViolationException.cs

注意

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

根据指定的 SerializationInfoStreamingContext 实例初始化 ProtocolViolationException 类的新实例。

protected:
 ProtocolViolationException(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
protected ProtocolViolationException (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 ProtocolViolationException (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
new System.Net.ProtocolViolationException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.ProtocolViolationException
[<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.ProtocolViolationException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.ProtocolViolationException
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)

参数

serializationInfo
SerializationInfo

SerializationInfo,包含反序列化 ProtocolViolationException 所需的信息。

streamingContext
StreamingContext

StreamingContext,它包含与新的 ProtocolViolationException 关联的序列化流的源。

属性

注解

此构造函数实现 ISerializable 类的 ProtocolViolationException 接口。

另请参阅

适用于