System.UriFormatException Class

The exception that is thrown when an invalid Uniform Resource Identifier (URI) is detected.

See Also: UriFormatException Members

Syntax

public class UriFormatException : FormatException

Remarks

The UriFormatException is thrown by the Uri class constructor if the supplied URI could not be correctly parsed. The format for a valid URI is defined in RFC 2396.

The text of the Exception.Message property indicates the reason that the exception was thrown.

Note:

This exception is not included in the tp://go.microsoft.com/fwlink/?LinkID=247912 or the Portable Class Library, but it is thrown by some members that are. To catch the exception in that case, write a catch statement for FormatException instead.

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Requirements

Namespace: System
Assembly: System (in System.dll)
Assembly Versions: 1.0.x.x, 1.0.5000.0, 2.0.0.0, 4.0.0.0