HttpListenerException Constructores

Definición

Inicializa una nueva instancia de la clase HttpListenerException.

Sobrecargas

HttpListenerException()

Inicializa una nueva instancia de la clase HttpListenerException.

HttpListenerException(Int32)

Inicializa una instancia nueva de la clase HttpListenerException con el código de error especificado.

HttpListenerException(Int32, String)

Inicializa una instancia nueva de la clase HttpListenerException con el mensaje y el código de error especificados.

HttpListenerException(SerializationInfo, StreamingContext)
Obsoletos.

Inicializa una nueva instancia de la clase HttpListenerException desde las instancias especificadas de las clases SerializationInfo y StreamingContext.

HttpListenerException()

Source:
HttpListenerException.cs
Source:
HttpListenerException.cs
Source:
HttpListenerException.cs

Inicializa una nueva instancia de la clase HttpListenerException.

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

Comentarios

Este constructor establece las ErrorCode propiedades y Message con el error de Windows más reciente.

Se aplica a

HttpListenerException(Int32)

Source:
HttpListenerException.cs
Source:
HttpListenerException.cs
Source:
HttpListenerException.cs

Inicializa una instancia nueva de la clase HttpListenerException con el código de error especificado.

public:
 HttpListenerException(int errorCode);
public HttpListenerException (int errorCode);
new System.Net.HttpListenerException : int -> System.Net.HttpListenerException
Public Sub New (errorCode As Integer)

Parámetros

errorCode
Int32

Un valor Int32 que identifica el error producido.

Comentarios

El valor de errorCode se usa para establecer la ErrorCode propiedad .

Se aplica a

HttpListenerException(Int32, String)

Source:
HttpListenerException.cs
Source:
HttpListenerException.cs
Source:
HttpListenerException.cs

Inicializa una instancia nueva de la clase HttpListenerException con el mensaje y el código de error especificados.

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)

Parámetros

errorCode
Int32

Un valor Int32 que identifica el error producido.

message
String

Objeto String que describe el error que se ha producido.

Comentarios

El valor de errorCode se usa para establecer la ErrorCode propiedad . El message parámetro se usa para establecer la Message propiedad .

Se aplica a

HttpListenerException(SerializationInfo, StreamingContext)

Source:
HttpListenerException.cs
Source:
HttpListenerException.cs
Source:
HttpListenerException.cs

Precaución

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

Inicializa una nueva instancia de la clase HttpListenerException desde las instancias especificadas de las clases SerializationInfo y 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)

Parámetros

serializationInfo
SerializationInfo

Un objeto SerializationInfo que contiene la información requerida para deserializar la nueva instancia de HttpListenerException.

streamingContext
StreamingContext

Un objeto StreamingContext.

Atributos

Consulte también

Se aplica a