System.Uri.Parse Method

Parses the URI of the current instance to ensure it contains all the parts required for a valid URI.

Syntax

[System.Obsolete("The method has been deprecated. It is not used by the system.")]
protected virtual void Parse ()

Exceptions

TypeReason
UriFormatException

The scheme of the URI is in an invalid format.

-or-

The URI is in an invalid form and cannot be parsed.

Remarks

Operation
This method parses the Uri.AbsolutePath property, separates it into various URI components, and stores the components in the appropriate Uri properties.

This method parses path components as defined in IETF RFC 2396.

Note to Inheritors
Override this method to provide parsing for URIs in formats that are not defined in IETF RFC 2396.

Usage
Applications typically do not call this method; it is intended for use by the constructors.

Requirements

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