Uri Members

The following tables list the members exposed by the Uri type.

Public Constructors

Name Description
Public Method Uri Overloaded. Creates a new instance of the Uri class.

Public Fields

Name Description
Public Field HttpDefaultPort This constant stores the default port for the http protocol, which is 80.
Public Field HttpsDefaultPort This constant stores the default port for the https protocol, which is 443.

Protected Fields

Name Description
Protected Field m_AbsolutePath The absolute path of the Uri.
Protected Field m_Flags Internal flags for the Uri.
Protected Field m_host The host name (this can begin with http or https).
Protected Field m_hostNameType The type of the host, such as Dns or IPv4.
Protected Field m_isAbsoluteUri Whether the Uri is absolute.
Protected Field m_isUnc Whether the path is a UNC (Universal Naming Convention) path.
Protected Field m_OriginalUriString The original string that was passed to the Uri constructor.
Protected Field m_port The port that is used by this Uri.
Protected Field m_scheme The scheme of the Uri.
Protected Field UnknownPort This constant indicates that the port for this protocol is unknown.

Public Properties

Name Description
Public Property AbsolutePath Gets a local operating-system representation of a file name, including the path.
Public Property AbsoluteUri Gets a string containing the absolute Uri or entire Uri of this instance.
Public Property Host Gets the host component of this instance.
Public Property HostNameType Gets the type of the host name specified in the URI.
Public Property IsAbsoluteUri Gets whether the Uri instance is absolute.
Public Property IsLoopback Gets whether the specified Uri refers to the local host.
Public Property IsUnc Gets whether the specified Uri is a universal naming convention (UNC) path.
Public Property OriginalString Gets the original URI string that was passed to the Uri constructor.
Public Property Port Gets the port number of this URI.
Public Property Scheme Gets the scheme name for this URI.

Public Methods

Name Description
Public Method Equals (Inherited from Object.)
Public Method GetType (Inherited from Object.)
Public Method Static IsWellFormedUriString Indicates whether the string is well-formed by attempting to construct a URI with the string.
Public Method ReferenceEquals (Inherited from Object.)
Public Method ToString (Inherited from Object.)

Protected Methods

Name Description
Protected Method ConstructAbsoluteUri Constructs an absolute Uri from a URI string.
Protected Method Finalize (Inherited from Object.)
Protected Method IsAlpha Checks to see if the character value is an alpha character.
Protected Method IsAlphaNumeric Checks to see if the character value is an alpha or numeric.
Protected Method IsHex Checks to see if the character value is Hex.
Protected Method IsIPv4 Returns whether the host name is an IP address with 4 bytes, such as: 192.12.1.1
Protected Method MemberwiseClone (Inherited from Object.)
Protected Method ParseUriString Parses a URI string into Uri variables.
Protected Method ValidateRelativePath Parses a relative Uri into variables.
Protected Method ValidateUriPart Validates that the part of the Uri after the scheme is valid, for an unknown Uri scheme.
Protected Method ValidateUrn Parses a Urn string into Uri variables.

See Also

Reference

Uri Class
System Namespace