public class UriFormatException : FormatException
Object
Exception
SystemException
FormatException
UriFormatException
System
Networking
Represents the error that occurs when a Uniform Resource Identifier (URI) is not correctly formatted.
[Note: The format for a valid URI is defined in IETF RFC 2396. ]
System Namespace
UriFormatException Constructors
UriFormatException() Constructor
UriFormatException(System.String) Constructor
public UriFormatException();
Constructs and initializes a new instance of the UriFormatException class.
This constructor initializes the System.UriFormatException.Message property of the new instance to a system-supplied message that describes the error, such as "The specified URI is incorrectly formatted." This message takes into account the current system culture.The System.UriFormatException.InnerException property of the new instance is initialized to
null
.
System.UriFormatException Class, System Namespace
public UriFormatException(string textString);
Constructs and initializes a new instance of the UriFormatException class with the specified message.
- textString
- A String that describes the error. The content of textString is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
This constructor initializes the System.UriFormatException.Message property of the new instance using textString. If textString isnull
, the System.UriFormatException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.The System.UriFormatException.InnerException property is initialized to
null
.
System.UriFormatException Class, System Namespace