UriFormatException Constructors

Definition

Initializes a new instance of the UriFormatException class.

Overloads

UriFormatException()

Initializes a new instance of the UriFormatException class.

UriFormatException(String)

Initializes a new instance of the UriFormatException class with the specified message.

UriFormatException(SerializationInfo, StreamingContext)

Initializes a new instance of the UriFormatException class from the specified SerializationInfo and StreamingContext instances.

UriFormatException(String, Exception)

Initializes a new instance of the UriFormatException class with a specified error message and a reference to the inner exception that is the cause of this exception.

UriFormatException()

Initializes a new instance of the UriFormatException class.

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

Remarks

The parameterless constructor initializes a new instance of the UriFormatException class with all fields set to null.

UriFormatException(String)

Initializes a new instance of the UriFormatException class with the specified message.

public:
 UriFormatException(System::String ^ textString);
public UriFormatException (string textString);
new UriFormatException : string -> UriFormatException
Public Sub New (textString As String)

Parameters

textString
String

The error message string.

Remarks

The UriFormatException constructor initializes the UriFormatException instance with the Message property set to the value of textString.

UriFormatException(SerializationInfo, StreamingContext)

Initializes a new instance of the UriFormatException class from the specified SerializationInfo and StreamingContext instances.

protected:
 UriFormatException(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
protected UriFormatException (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
new UriFormatException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> UriFormatException

Parameters

serializationInfo
SerializationInfo

A SerializationInfo that contains the information that is required to serialize the new UriFormatException.

streamingContext
StreamingContext

A StreamingContext that contains the source of the serialized stream that is associated with the new UriFormatException.

Remarks

This constructor implements the ISerializable interface for the UriFormatException class.

See also

UriFormatException(String, Exception)

Initializes a new instance of the UriFormatException class with a specified error message and a reference to the inner exception that is the cause of this exception.

public:
 UriFormatException(System::String ^ textString, Exception ^ e);
public UriFormatException (string textString, Exception e);
new UriFormatException : string * Exception -> UriFormatException
Public Sub New (textString As String, e As Exception)

Parameters

textString
String

The message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

e
Exception

The exception that is the cause of the current exception. If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Remarks

An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

The following table shows the initial property values for an instance of UriFormatException.

Property Value
InnerException null.
Message The error message string specified in message.

See also

Applies to