The Uri type exposes the following members.

Constructors

  NameDescription
Public methodUri(String)
Initializes a new instance of the [!:System.Uri] class with the specified URI.
Public methodUri(String, UriKind)
Constructs Uri from string and enumeration that tell what is the type of Uri.

Methods

  NameDescription
Protected methodConstructAbsoluteUri
Constructs an absolute Uri from a URI string.
Public methodEquals (Overrides Object..::..Equals(Object).)
Public methodGetHashCode (Overrides Object..::..GetHashCode()()()().)
Protected methodIsAlpha
Checks to see if the character value is an alpha character.
Protected methodIsAlphaNumeric
Checks to see if the character value is an alpha or numeric.
Protected methodIsHex
Checks to see if the character value is Hex.
Protected methodIsIPv4
Returns if host name is IP adress 4 bytes. Like 192.1.1.1
Public methodStatic memberIsWellFormedUriString
Indicates whether the string is well-formed by attempting to construct a URI with the string.
Protected methodParseUriString
Internal method parses a URI string into Uri variables
Protected methodValidateRelativePath
Parses relative Uri into variables.
Protected methodValidateUriPart
Validates that part of Uri after sheme is valid for unknown Uri scheme
Protected methodValidateUrn
Parses urn string into Uri variables. Parsing is restricted to basic urn:NamespaceID, urn:uuid formats only.

Operators

  NameDescription
Public operatorStatic memberEquality
Public operatorStatic memberInequality

Fields

  NameDescription
Public fieldStatic memberHttpDefaultPort
Default port for http protocol - 80
Public fieldStatic memberHttpsDefaultPort
Default port for https protocol - 443
Protected fieldm_AbsolutePath
Member varialbe that keeps absolute path.
Protected fieldm_Flags
Member variable that keeps internal flags/
Protected fieldm_host
Member varialbe that keeps host name ( http and https ).
Protected fieldm_hostNameType
Type of the host.
Protected fieldm_isAbsoluteUri
Member varialbe that keeps boolean if Uri is absolute.
Protected fieldm_isUnc
Member varialbe that tells if path is UNC ( Universal Naming Convention ) In this class it is always false, but can be changed in derived classes.
Protected fieldm_OriginalUriString
Member varialbe that keeps original string passed to Uri constructor.
Protected fieldm_port
Member variable that keeps port used by this uri.
Protected fieldm_scheme
Member varialbe that keeps scheme of Uri.
Protected fieldStatic memberUnknownPort
Constant to indicate that port for this protocol is unknown

Properties

  NameDescription
Public propertyAbsolutePath
Gets a local operating-system representation of a file name.
Public propertyAbsoluteUri
Gets a string containing the absolute uri or entire uri of this instance.
Public propertyHost
Gets the host component of this instance.
Public propertyHostNameType
Gets the type of the host name specified in the URI.
Public propertyIsAbsoluteUri
Gets whether the [!:System.Uri] instance is absolute.
Public propertyIsLoopback
Gets whether the specified [!:System.Uri] refers to the local host.
Public propertyIsUnc
Gets whether the specified [!:System.Uri] is a universal naming convention (UNC) path.
Public propertyOriginalString
Gets the original URI string that was passed to the Uri constructor.
Public propertyPort
Gets the port number of this URI.
Public propertyScheme
Gets the scheme name for this URI.

See Also