Breyta

Deila með


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)
Obsolete.

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()

Source:
UriFormatException.cs
Source:
UriFormatException.cs
Source:
UriFormatException.cs

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.

Applies to

UriFormatException(String)

Source:
UriFormatException.cs
Source:
UriFormatException.cs
Source:
UriFormatException.cs

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

public:
 UriFormatException(System::String ^ textString);
public UriFormatException (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.

Applies to

UriFormatException(SerializationInfo, StreamingContext)

Source:
UriFormatException.cs
Source:
UriFormatException.cs
Source:
UriFormatException.cs

Caution

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

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

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.

Attributes

Remarks

This constructor implements the ISerializable interface for the UriFormatException class.

See also

Applies to

UriFormatException(String, Exception)

Source:
UriFormatException.cs
Source:
UriFormatException.cs
Source:
UriFormatException.cs

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);
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