Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
System Namespace
Uri Class
 Uri Members
Members FilterMembers Filter
Frameworks FilterFrameworks Filter
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
Uri Members

Updated: November 2007

Provides an object representation of a uniform resource identifier (URI) and easy access to the parts of the URI.

The Uri type exposes the following members.

  NameDescription
UriOverloaded. Initializes a new instance of the Uri class.
Top
  NameDescription
CanonicalizeInfrastructure. Obsolete. Converts the internally stored URI to canonical form.
CheckHostName Determines whether the specified host name is a valid DNS name.
CheckSchemeName Determines whether the specified scheme name is valid.
CheckSecurityInfrastructure. Obsolete. Calling this method has no effect.
Compare Compares the specified parts of two URIs using the specified comparison rules.
CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Equals Compares two Uri instances for equality. (Overrides Object..::.Equals(Object).)
EscapeInfrastructure. Obsolete. Converts any unsafe or reserved characters in the path component to their hexadecimal character representations.
EscapeDataString Converts a string to its escaped representation.
EscapeString Obsolete. Converts a string to its escaped representation.
EscapeUriString Converts a URI string to its escaped representation.
Finalize Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
FromHex Gets the decimal value of a hexadecimal digit.
GetComponents Gets the specified components of the current instance using the specified escaping for special characters.
GetHashCode Gets the hash code for the URI. (Overrides Object..::.GetHashCode()()().)
GetLeftPart Gets the specified portion of a Uri instance.
GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetObjectData Returns the data needed to serialize the current instance.
GetType Gets the Type of the current instance. (Inherited from Object.)
HexEscape Converts a specified character into its hexadecimal equivalent.
HexUnescape Converts a specified hexadecimal representation of a character to the character.
InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
IsBadFileSystemCharacterInfrastructure. Obsolete. Gets whether a character is invalid in a file system name.
IsBaseOf Determines whether the current Uri instance is a base of the specified Uri instance.
IsExcludedCharacterInfrastructure. Obsolete. Gets whether the specified character should be escaped.
IsHexDigit Determines whether a specified character is a valid hexadecimal digit.
IsHexEncoding Determines whether a character in a string is hexadecimal encoded.
IsReservedCharacterInfrastructure. Obsolete. Gets whether the specified character is a reserved character.
IsWellFormedOriginalString Indicates whether the string used to construct this Uri was well-formed and is not required to be further escaped.
IsWellFormedUriString 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 Obsolete. Determines the difference between two Uri instances.
MakeRelativeUri Determines the difference between two Uri instances.
MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
ParseInfrastructure. Obsolete. Parses the URI of the current instance to ensure it contains all the parts required for a valid URI.
ToString Gets a canonical string representation for the specified Uri instance. (Overrides Object..::.ToString()()().)
TryCreateOverloaded. Creates a new Uri. Does not throw an exception if the Uri cannot be created.
UnescapeInfrastructure. Obsolete. Converts the specified string by replacing any escape sequences with their unescaped representation.
UnescapeDataString Converts a string to its unescaped representation.
Top
  NameDescription
Equality Determines whether two Uri instances have the same value.
Inequality Determines whether two Uri instances do not have the same value.
Top
  NameDescription
SchemeDelimiter Specifies the characters that separate the communication protocol scheme from the address portion of the URI. This field is read-only.
UriSchemeFile Specifies that the URI is a pointer to a file. This field is read-only.
UriSchemeFtp Specifies that the URI is accessed through the File Transfer Protocol (FTP). This field is read-only.
UriSchemeGopher Specifies that the URI is accessed through the Gopher protocol. This field is read-only.
UriSchemeHttp Specifies that the URI is accessed through the Hypertext Transfer Protocol (HTTP). This field is read-only.
UriSchemeHttps Specifies that the URI is accessed through the Secure Hypertext Transfer Protocol (HTTPS). This field is read-only.
UriSchemeMailto Specifies that the URI is an e-mail address and is accessed through the Simple Mail Transport Protocol (SMTP). This field is read-only.
UriSchemeNetPipe Specifies that the URI is accessed through the NetPipe scheme of the "Indigo" system. This field is read-only.
UriSchemeNetTcp Specifies that the URI is accessed through the NetTcp scheme of the "Indigo" system. This field is read-only.
UriSchemeNews Specifies that the URI is an Internet news group and is accessed through the Network News Transport Protocol (NNTP). This field is read-only.
UriSchemeNntp Specifies that the URI is an Internet news group and is accessed through the Network News Transport Protocol (NNTP). This field is read-only.
Top
  NameDescription
AbsolutePath Gets the absolute path of the URI.
AbsoluteUri Gets the absolute URI.
Authority Gets the Domain Name System (DNS) host name or IP address and the port number for a server.
DnsSafeHost Gets an unescaped host name that is safe to use for DNS resolution.
Fragment Gets the escaped URI fragment.
Host Gets the host component of this instance.
HostNameType Gets the type of the host name specified in the URI.
IsAbsoluteUri Gets whether the Uri instance is absolute.
IsDefaultPort Gets whether the port value of the URI is the default for this scheme.
IsFile Gets a value indicating whether the specified Uri is a file URI.
IsLoopback Gets whether the specified Uri references the local host.
IsUnc Gets whether the specified Uri is a universal naming convention (UNC) path.
LocalPath Gets a local operating-system representation of a file name.
OriginalString Gets the original URI string that was passed to the Uri constructor.
PathAndQuery Gets the AbsolutePath and Query properties separated by a question mark (?).
Port Gets the port number of this URI.
Query Gets any query information included in the specified URI.
Scheme Gets the scheme name for this URI.
Segments Gets an array containing the path segments that make up the specified URI.
UserEscaped Indicates that the URI string was completely escaped before the Uri instance was created.
UserInfo Gets the user name, password, or other user-specific information associated with the specified URI.
Top
  NameDescription
ISerializable..::.GetObjectData Returns the data needed to serialize the current instance.
Top
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations