System.Uri: Method Members

The methods of System.Uri are listed below. For a list of all members, see the Uri Members list.

See Also: Inherited members from System.Object

Public Methods

static
CheckHostName(string) : UriHostNameType

Determines whether the specified host name is a valid DNS name.

static
CheckSchemeName(string) : bool

Determines whether the specified scheme name is valid.

static
Compare(Uri, Uri, UriComponents, UriFormat, StringComparison) : int

Compares the specified parts of two URIs using the specified comparison rules.

override
Equals(object) : bool

Compares two Uri instances for equality.

static
EscapeDataString(string) : string

Converts a string to its escaped representation.

static
EscapeUriString(string) : string

Converts a URI string to its escaped representation.

static
FromHex(char) : int

Gets the decimal value of a hexadecimal digit.

GetComponents(UriComponents, UriFormat) : string

Gets the specified components of the current instance using the specified escaping for special characters.

override
GetHashCode() : int

Gets the hash code for the URI.

GetLeftPart(UriPartial) : string

Gets the specified portion of a Uri instance.

static
HexEscape(char) : string

Converts a specified character into its hexadecimal equivalent.

static
HexUnescape(string, ref int) : char
Converts a specified escaped hexadecimal representation of a character to the character.
IsBaseOf(Uri) : bool

Determines whether the current Uri instance is a base of the specified Uri instance.

static
IsHexDigit(char) : bool

Determines whether a specified character is a valid hexadecimal digit.

static
IsHexEncoding(string, int) : bool

Determines whether a character in a string is hexadecimal encoded.

IsWellFormedOriginalString() : bool

Indicates whether the string used to construct this Uri was well-formed and is not required to be further escaped.

static
IsWellFormedUriString(string, UriKind) : bool

Indicates whether the string is well-formed by attempting to construct a URI with the string and ensures that the string does not require further escaping.

MakeRelative(Uri) : string

Determines the difference between two Uri instances.

MakeRelativeUri(Uri) : Uri

Determines the difference between two Uri instances.

override
ToString() : string

Gets a canonical string representation for the specified Uri instance.

static
TryCreate(string, UriKind, out Uri) : bool
Documentation for this section has not yet been entered.
static
TryCreate(Uri, string, out Uri) : bool
Documentation for this section has not yet been entered.
static
TryCreate(Uri, Uri, out Uri) : bool
Documentation for this section has not yet been entered.
static
UnescapeDataString(string) : string

Converts a string to its unescaped representation.

Protected Methods

Canonicalize()

Converts the internally stored URI to canonical form.

CheckSecurity()

Calling this method has no effect.

Escape()

Converts any unsafe or reserved characters in the path component to their hexadecimal character representations.

static
EscapeString(string) : string

Converts a string to its escaped representation.

GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)

Returns the data needed to serialize the current instance.

IsBadFileSystemCharacter(char) : bool

Gets whether a character is invalid in a file system name.

static
IsExcludedCharacter(char) : bool

Gets whether the specified character should be escaped.

IsReservedCharacter(char) : bool

Gets whether the specified character is a reserved character.

Parse()

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

Unescape(string) : string

Converts the specified string by replacing any escape sequences with their unescaped representation.