HttpListenerException 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 HttpListenerException 类的新实例。
重载
HttpListenerException() |
初始化 HttpListenerException 类的新实例。 |
HttpListenerException(Int32) |
使用指定的错误代码初始化 HttpListenerException 类的新实例。 |
HttpListenerException(Int32, String) |
使用指定的错误代码和信息初始化 HttpListenerException 类的新实例。 |
HttpListenerException(SerializationInfo, StreamingContext) |
已过时.
从 HttpListenerException 和 SerializationInfo 类的指定实例初始化 StreamingContext 类的新实例。 |
HttpListenerException()
- Source:
- HttpListenerException.cs
- Source:
- HttpListenerException.cs
- Source:
- HttpListenerException.cs
初始化 HttpListenerException 类的新实例。
public:
HttpListenerException();
public HttpListenerException ();
Public Sub New ()
注解
此构造函数使用最新的 Windows 错误设置 ErrorCode 和 Message 属性。
适用于
HttpListenerException(Int32)
- Source:
- HttpListenerException.cs
- Source:
- HttpListenerException.cs
- Source:
- HttpListenerException.cs
使用指定的错误代码初始化 HttpListenerException 类的新实例。
public:
HttpListenerException(int errorCode);
public HttpListenerException (int errorCode);
new System.Net.HttpListenerException : int -> System.Net.HttpListenerException
Public Sub New (errorCode As Integer)
参数
注解
的值 errorCode
用于设置 ErrorCode 属性。
适用于
HttpListenerException(Int32, String)
- Source:
- HttpListenerException.cs
- Source:
- HttpListenerException.cs
- Source:
- HttpListenerException.cs
使用指定的错误代码和信息初始化 HttpListenerException 类的新实例。
public:
HttpListenerException(int errorCode, System::String ^ message);
public HttpListenerException (int errorCode, string message);
new System.Net.HttpListenerException : int * string -> System.Net.HttpListenerException
Public Sub New (errorCode As Integer, message As String)
参数
注解
的值 errorCode
用于设置 ErrorCode 属性。 参数 message
用于设置 Message 属性。
适用于
HttpListenerException(SerializationInfo, StreamingContext)
- Source:
- HttpListenerException.cs
- Source:
- HttpListenerException.cs
- Source:
- HttpListenerException.cs
注意
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
从 HttpListenerException 和 SerializationInfo 类的指定实例初始化 StreamingContext 类的新实例。
protected:
HttpListenerException(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
protected HttpListenerException (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 HttpListenerException (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
new System.Net.HttpListenerException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.HttpListenerException
[<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.HttpListenerException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.HttpListenerException
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)
参数
- serializationInfo
- SerializationInfo
一个 SerializationInfo 对象,包含反序列化新的 HttpListenerException 对象所需的信息。
- streamingContext
- StreamingContext
StreamingContext 对象。
- 属性