Networking System [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.x.x 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.Object System.Runtime.Serialization.ISerializable System.ComponentModel.TypeConverter(typeof(System.UriTypeConverter))

A URI is a compact representation of a resource available to your application on the intranet or Internet. The class defines the properties and methods for handling URIs, including parsing, comparing, and combining. The class properties are read-only; to create a modifiable object, use the class.

Relative URIs (for example, "/new/index.htm") must be expanded with respect to a base URI so that they are absolute. The method is provided to convert absolute URIs to relative URIs when necessary.

The constructors do not escape URI strings if the string is a well-formed URI including a scheme identifier.

The properties return a canonical data representation in escaped encoding, with all characters with Unicode values greater than 127 replaced with their hexadecimal equivalents. To put the URI in canonical form, the constructor performs the following steps:

Converts the URI scheme to lowercase.

Converts the host name to lowercase.

If the host name is an IPv6 address, the canonical IPv6 address is used. ScopeId and other optional IPv6 data are removed.

Removes default and empty port numbers.

Canonicalizes the path for hierarchical URIs by compacting sequences such as /./, /../, //, including escaped representations. Note that there are some schemes for which escaped representations are not compacted.

For hierarchical URIs, if the host is not terminated with a forward slash (/), one is added.

By default, any reserved characters in the URI are escaped in accordance with RFC 2396. This behavior changes if International Resource Identifiers or International Domain Name parsing is enabled in which case reserved characters in the URI are escaped in accordance with RFC 3986 and RFC 3987.

As part of canonicalization in the constructor for some schemes, escaped representations are compacted. The schemes for which URI will compact escaped sequences include the following: file, http, https, net.pipe, and net.tcp. For all other schemes, escaped sequences are not compacted. For example: if you percent encode the two dots ".." as "%2E%2E" then the URI constructor will compact this sequence for some schemes. For example, the following code sample shows a URI constructor for the http scheme.

`Uri uri = new Uri("http://myUrl/%2E%2E/%2E%2E"); Console.WriteLine(uri.AbsoluteUri); Console.WriteLine(uri.PathAndQuery);`

When this code is executed, it returns the following output with the escaped sequence compacted.

`http://myUrl/ /`

The following code example shows a URI constructor for the ftp scheme:

`Uri uri = new Uri("ftp://myUrl/%2E%2E/%2E%2E"); Console.WriteLine(uri.AbsoluteUri); Console.WriteLine(uri.PathAndQuery);`

When this code is executed, it returns the following output with the escaped sequence not compacted.

`ftp://myUrl/%2E%2E/%2E%2E /%2E%2E/%2E%2E`

You can transform the contents of the class from an escape encoded URI reference to a readable URI reference by using the method. Note that some reserved characters might still be escaped in the output of the method. This is to support unambiguous reconstruction of a URI from the value returned by .

Some URIs include a fragment identifier or a query or both. A fragment identifier is any text that follows a number sign (#), not including the number sign; the fragment text is stored in the property. Query information is any text that follows a question mark (?) in the URI; the query text is stored in the property.

In the .NET Framework version 1.1, if the string specified to a constructor contains an unknown scheme and "c:\", the Uri class inserts "//" after the colon. For example, the URI xyz:c:\abc is converted to xyz://c:/abc. In the .NET Framework version 2.0, this behavior has been removed, and the example string is converted to xyz:c:/abc.

The URI class supports the use of IP addresses in both quad-notation for IPv4 protocol and colon-hexadecimal for IPv6 protocol. Remember to enclose the IPv6 address in square brackets, as in http://[::1].

## International Resource Identifier Support

Web addresses are typically expressed using uniform resource identifiers that consist of a very restricted set of characters:

Upper and lower case ASCII letters from the English alphabet.

Digits from 0 to 9.

A small number of other ASCII symbols.

The specifications for URIs are documented in RFC 2396, RFC 2732, RFC 3986, and RFC 3987 published by the Internet Engineering Task Force (IETF).

With the growth of the Internet, there is a growing need to identify resources using languages other than English. Identifiers which facilitate this need and allow non-ASCII characters (characters in the Unicode/ISO 10646 character set) are known as International Resource Identifiers (IRIs). The specifications for IRIs are documented in RFC 3987 published by IETF. Using IRIs allows a URL to contain Unicode characters.

The existing class has been extended in .NET Framework v3.5, 3.0 SP1, and 2.0 SP1 to provide IRI support based on RFC 3987. Current users will not see any change from the .NET Framework 2.0 behavior unless they specifically enable IRI. This ensures application compatibility with prior versions of the .NET Framework.

To enable support for IRI, the following change is required:

Specify whether you want Internationalized Domain Name (IDN) parsing applied to the domain name and whether IRI parsing rules should be applied. This can be done in the machine.config or in the app.config file. For example, add the following:

`<configuration> <uri> <idn enabled="All" /> <iriParsing enabled="true" /> </uri> </configuration>`

Enabling IDN will convert all Unicode labels in a domain name to their Punycode equivalents. Punycode names contain only ASCII characters and always start with the xn-- prefix. The reason for this is to support existing DNS servers on the Internet, since most DNS servers only support ASCII characters (see RFC 3940).

Enabling IRI and IDN affects the value of the property. Enabling IRI and IDN can also change the behavior of the , , , and methods.

There are three possible values for IDN depending on the DNS servers that are used:

idn enabled = All

This value will convert any Unicode domain names to their Punycode equivalents (IDN names).

idn enabled = AllExceptIntranet

This value will convert all Unicode domain names not on the local Intranet to use the Punycode equivalents (IDN names). In this case to handle international names on the local Intranet, the DNS servers that are used for the Intranet should support Unicode name resolution.

idn enabled = None

This value will not convert any Unicode domain names to use Punycode. This is the default value which is consistent with the .NET Framework 2.0 behaviour.

Enabling IRI parsing (iriParsing enabled = true) will do normalization and character checking according to the latest IRI rules in RFC 3986 and RFC 3987. The default value is false and will do normalization and character checking according to RFC 2396 and RFC 2732 (for IPv6 literals).

IRI and IDN processing in the class can also be controlled using the , , and configuration setting classes. The setting enables or disables IRI processing in the class. The setting enables or disables IDN processing in the class. The setting also indirectly controls IDN. IRI processing must be enabled for IDN processing to be possible. If IRI processing is disabled, then IDN processing will be set to the default setting where the .NET Framework 2.0 behavior is used for compatibility and IDN names are not used.

The configuration setting for the and will be read once when the first class is constructed. Changes to configuration settings after that time are ignored.

The class has also been extended to allow creating a customizable parser that supports IRI and IDN. The behavior of a object is specified by passing a bitwise combination of the values available in the enumeration to the constructor. The type indicates the parser supports the parsing rules specified in RFC 3987 for International Resource Identifiers (IRI). Whether IRI is used is dictated by the configuration values previously discussed.

The type indicates the parser supports Internationalized Domain Name (IDN) parsing (IDN) of host names. Whether IDN is used is dictated by the configuration values previously discussed.

## Performance Considerations

If you use a Web.config file that contains URIs to initialize your application, additional time is required to process the URIs if their scheme identifiers are nonstandard. In such a case, initialize the affected parts of your application when the URIs are needed, not at start time.

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

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  is .

  is a zero length string or contains only spaces.

  -or-

  is in an invalid form and cannot be parsed.

  This constructor creates a instance from a URI string. It parses the URI, puts it in canonical format, and makes any required escape encodings.

  This constructor does not ensure that the refers to an accessible resource.

  This constructor assumes that the parameter references an absolute URI and is equivalent to calling the constructor with set to . If the parameter passed to the constructor is a relative URI, this constructor will throw a .

  Initializes a new instance of the class with the specified URI.

  A URI.
  0
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  This constructor implements the interface for the class.

  Initializes a new instance of the class from the specified instances of the and classes.

  An instance of the class containing the information required to serialize the new instance.
  An instance of the class containing the source of the serialized stream associated with the new instance.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete

  is .

  is a zero length string or contains only spaces.

  -or-

  The parsing routine detected a scheme in an invalid form.

  -or-

  The parser detected more than two consecutive slashes in a URI that does not use the "file" scheme.

  -or-

  is in an invalid form and cannot be parsed.

  The following example creates a instance for the URI "http://www.contoso.com/Hello%20World.htm". Because the URI contains escaped characters, the third parameter, , is set to .

  using System;

  public class UriTest { public static void Main() {

  Uri myUri = new Uri("http://www.contoso.com/Hello%20World.htm", true);

  Console.WriteLine(myUri.ToString()); } }

  The output is

  http://www.contoso.com/Hello World.htm

  This constructor creates a instance from a URI string. It parses the URI and puts it in canonical format.

  The parameter controls whether reserved characters are translated into escape sequences. This parameter should be set to true only if you are certain that all reserved characters in the URI have been escaped. Setting the value to true for a URI that has not been completely escaped can cause unexpected behavior. It is strongly recommended that you always set this parameter to false.

  If is set to false, the constructor escapes any reserved characters by checking that all occurrences of percent (%) are followed by a valid escape sequence. If the character sequence following a percent is not valid, the percent is replaced by %25.

  This constructor does not ensure that the refers to an accessible resource.

  Initializes a new instance of the class with the specified URI, with explicit control of character escaping.

  The URI.
  true if is completely escaped; otherwise, false. See Remarks.
  0
- Constructor
  2.0.0.0
  4.0.0.0

  Relative and absolute URIs have different restrictions on their format. For example, a relative URI does not require a scheme or an authority. The value you specify in must match the type of URI passed in . However, if is specified, the URI string can be relative or absolute.

  Initializes a new instance of the class with the specified URI. This constructor allows you to specify if the URI string is a relative URI, absolute URI, or is indeterminate.

  A string that identifies the resource to be represented by the instance.
  Specifies whether the URI string is a relative URI, absolute URI, or is indeterminate.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  is in an invalid form.

  is .

  This constructor creates a instance by combining the and the . If is an absolute URI (containing a scheme, host name, and optionally a port number), the instance is created using only .

  This constructor does not ensure that the refers to an accessible resource.

  Initializes a new instance of the class based on the specified base URI and relative URI string.

  The base URI.
  The relative URI to add to the base URI.
  0
- Constructor
  2.0.0.0
  4.0.0.0

  This constructor creates a new instance by combining an absolute instance, , with a relative instance, . If is an absolute instance (containing a scheme, host name, and optionally a port number), the instance is created using only .

  This constructor does not ensure that the refers to an accessible resource.

  Initializes a new instance of the class based on the combination of a specified base instance and a relative instance.

  An absolute that is the base for the new instance.
  A relative instance that is combined with .
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("dontEscape is always false")

  is in an invalid form.

  is .

  The following example creates new instances of the class by combining a instance representing the base URI and a string containing a relative URI.

  using System;

  public class UriTest { public static void Main() {

  // Typical base and relative URI constructor usage.

  Uri baseUri = new Uri("http://www.contoso.com", true); Uri myUri = new Uri(baseUri, "index.htm",true); Console.WriteLine("Typical usage: {0}",myUri.ToString());

  // Base and relative URI contain slashes. Uri baseUri2 = new Uri("http://www.contoso.com/", true); Uri myUri2 = new Uri(baseUri2, "/index.htm",true); Console.WriteLine("Slash example: {0}",myUri2.ToString());

  // Relative URI contains a different scheme than the base URI. Uri baseUri3 = new Uri("http://www.contoso.com/", true); Uri myUri3 = new Uri(baseUri3, "ftp://www.contoso2.com/index.htm",true); Console.WriteLine("Different schemes: {0}", myUri3.ToString());

  // Relative URI contains the same scheme as the base URI. // The scheme delimiter is not present in the relative URI. Uri baseUri4 = new Uri("http://www.contoso.com/", true); Uri myUri4 = new Uri(baseUri4, "http:www.contoso2.com/index.htm",true); Console.WriteLine("Same schemes - relative treated as relative: {0}",myUri4.ToString());

  // Relative URI contains the same scheme as the base URI. // The scheme delimiter is present in the relative URI. Uri baseUri5 = new Uri("http://www.contoso.com/", true); Uri myUri5 = new Uri(baseUri5, "http://www.contoso2/index.htm",true); Console.WriteLine("Same schemes - relative treated as absolute: {0}",myUri5.ToString());

  } }

  The output is

  Typical usage: http://www.contoso.com/index.htm

  Slash example: http://www.contoso.com/index.htm

  Different schemes: ftp://www.contoso2.com/index.htm

  Same schemes - relative treated as relative: http://www.contoso.com/www.contoso2 .com/index.htm

  Same schemes - relative treated as absolute: http://www.contoso2/index.htm

  This constructor creates a instance by combining and . If the URI passed in is an absolute URI (containing a scheme, host name, and optionally a port number), the instance is created using only .

  The parameter controls whether reserved characters are translated into escape sequences. This parameter should be set to true only if you are certain that all reserved characters in the URI have been escaped. Setting the value to true for a URI that has not been completely escaped can cause unexpected behavior. It is strongly recommended that you always set this parameter to false. If is set to false, the constructor escapes any reserved characters by checking that all occurrences of percent (%) are followed by a valid escape sequence. If the character sequence following a percent is not valid, the percent is replaced by %25.

  This constructor does not ensure that the refers to an accessible resource.

  Initializes a new instance of the class based on the specified base and relative URIs, with explicit control of character escaping.

  The base URI.
  The relative URI to add to the base URI.
  true if is completely escaped; otherwise, false. See Remarks.
  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing the absolute path to the resource.

  The following example outputs the absolute path of a URI.

  `using System; public class UriTest { public static void Main() { Uri myUri = new Uri ("http://www.contoso.com/URI/Hello%20World.htm?date=today", true); Console.WriteLine(myUri.AbsolutePath); } }`

  The output is

  /URI/Hello%20World.htm

  The property contains the path information that the server uses to resolve requests for information. Typically this is the path to the desired information on the server's file system, although it also can indicate the application or script the server must run to provide the information.

  The path information does not include the scheme, host name, or query portion of the URI.

  Gets the absolute path of the URI.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing the URI used to construct the current instance, in canonical format.

  The property includes the entire URI stored in the instance, including all fragments and query strings.

  Gets the absolute URI.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing the authority component of the current instance. The value returned by this property is composed of the values returned by the and properties.

  The property is typically a server DNS host name or IP address. This property might include the service port number if it differs from the default port for the URI. If the component contains reserved characters, these are escaped in the string value returned by this property.

  Gets the Domain Name System (DNS) host name or IP address and the port number for a server.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("This method does nothing, it has been obsoleted")
  System.Void

  Stores the canonical version of the URI internally.

  Converts the internally stored URI to canonical form.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.UriHostNameType ``

  The following example demonstrates using the method.

  `using System; public class UriTest { public static void Main() { Console.WriteLine(Uri.CheckHostName("www.contoso.com")); } }`

  The output is

  Dns

  The method checks that the host name provided meets the requirements for a valid Internet host name. It does not, however, perform a host-name lookup to verify the existence of the host.

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

  A that indicates the type of the host name. If the type of the host name cannot be determined or if the host name is null or a zero-length string, this method returns .

  The host name to validate. This can be an IPv4 or IPv6 address or an Internet host name. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  This method checks the scheme name for validity according to RFC 2396 by default. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, this method checks the scheme name for validity according to RFC 3986. The scheme name must begin with a letter and must contain only letters, digits, and the characters ".", "+", or "-".

  For more information on IRI support, see the Remarks section for the class.

  Determines whether the specified scheme name is valid.

  A value that is true if the scheme name is valid; otherwise, false.

  The scheme name to validate. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.MonoTODO("Find out what this should do")
  System.Obsolete
  System.Void

  This method checks for invalid or dangerous character sequences in the components of the current instance, and removes them. The semantics that determine whether a character sequence presents a security risk are determined by the scheme of the current instance.

  The default implementation does nothing.

  Override this method to provide security checks for types derived from .

  Invoke this method on instances of types derived from to remove any URI content that allows unauthorized access to resources.

  Calling this method has no effect.

  0
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` `` `` ``

  If both and are null, this method returns 0. When comparing URI values, a relative URI is always less than an absolute URI, and a non-null URI is always greater than a null URI. For cases where both and are not null and are both relative URIs or both absolute URIs, the method performs the comparison.

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

  An value that indicates the lexical relationship between the compared components.

  Value

  Meaning

  Less than zero

  is less than .

  Zero

  equals .

  Greater than zero

  is greater than .

  The first . The second . A bitwise combination of the values that specifies the parts of and to compare. One of the values that specifies the character escaping used when the URI components are compared. One of the values.
- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  For IPv6 addresses, the brackets ([]) are removed and the property is set, if one was specified when this instance was constructed.

  The property has been extended in .NET Framework v3.5, 3.0 SP1, and 2.0 SP1 to provide International Resource Identifier (IRI) support based on RFC 3987. Current users will not see any change from the .NET Framework 2.0 behavior unless they specifically enable IRI. This ensures application compatibility with prior versions of the .NET Framework.

  To enable support for IRI, the following two changes are required:

  Add the following line to the machine.config file under the .NET Framework 2.0 directory

  <section name="uri" type="System.Configuration.UriSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

  Specify whether you want Internationalized Domain Name (IDN) parsing applied to the domain name and whether IRI parsing rules should be applied. This can be done in the machine.config or in the app.config file. For example, add the following:

  `<configuration> <uri> <idn enabled="All" /> <iriParsing enabled="true" /> </uri> </configuration>`

  Enabling IDN will convert all Unicode labels in a domain name to their Punycode equivalents. Punycode names contain only ASCII characters and always start with the xn-- prefix. The reason for this is to support existing DNS servers on the Internet, since most DNS servers only support ASCII characters (see RFC 3940).

  Enabling IDN only affects the value of the property.

  There are three possible values for IDN depending on the DNS servers that are used:

  idn enabled = All

  This value will convert any Unicode domain names to their Punycode equivalents (IDN names).

  idn enabled = AllExceptIntranet

  This value will convert all external Unicode domain names to use the Punycode equivalents (IDN names). In this case to handle international names on the local Intranet, the DNS servers that are used for the Intranet should support Unicode names.

  idn enabled = None

  This value will not convert any Unicode domain names to use Punycode. This is the default value which is consistent with the .NET Framework 2.0 behaviour.

  Enabling IRI parsing (iriParsing enabled = true) will do normalization and character checking according to the latest IRI rules in RFC 3987. The default value is false and will do normalization and character checking according to RFC 2396 and RFC 2732 (for IPv6 literals).

  For more information on IRI support, see the Remarks section for the class.

  Gets an unescaped host name that is safe to use for DNS resolution.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  The method compares the two instances without regard to user information () and fragment () parts that they might contain. For example, given the URIs http://www.contoso.com/index.htm#search and http://user:password@www.contoso.com/index.htm, the method would return true.

  If one instance is formed with a Unicode host name and parameter contains a instance or identifier that is formed with a host name that has the equivalent Punycode host name, then returns true only if International Resource Identifier (IRI) and Internationalized Domain Name (IDN) support are enabled. Punycode names contain only ASCII characters and always start with the xn-- prefix.

  For more information on IRI support, see the Remarks section for the class.

  In the .NET Framework versions 1.0 and 1.1, the is also ignored.

  The method can be overridden in a derived class; use caution as a malicious entity could modify the method. You should not use this method to perform security checks unless you know that this instance came from a trusted source.

  Compares two instances for equality.

  A value that is true if the two instances represent the same URI; otherwise, false.

  The instance or a URI identifier to compare with the current instance. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Void

  Converts any unsafe or reserved characters in the component to a character sequence consisting of a "%" followed by the hexadecimal value of the character as described by IETF 2396.

  If the path component of the current instance is , the escaped path is .

  As described above.

  Override this method to customize the escaping behavior provided by the type.

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

  For additional information on escaping URI, see section 2 of RFC 2396.

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

  0
- Method
  2.0.0.0
  4.0.0.0
  System.String ``

  By default, the method converts all characters except for RFC 2396 unreserved characters to their hexadecimal representation. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the method converts all characters, except for RFC 3986 unreserved characters, to their hexadecimal representation. All Unicode characters are converted to UTF-8 format before being escaped.

  This method assumes that has no escape sequences in it.

  By default, the string is escaped according to RFC 2396. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the string is escaped according to RFC 3986 and RFC 3987. See these RFCs for a definition of reserved and unreserved characters.

  For more information on IRI support, see the Remarks section for the class.

  Converts a string to its escaped representation.

  A that contains the escaped representation of .

  The string to escape.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.String ``

  The method converts RFC 2396 reserved characters and all characters with a character value greater than 127 to hexadecimal representation. All Unicode characters are converted to UTF-8 format before being escaped.

  By default, the string is escaped according to RFC 2396. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the string is escaped according to RFC 3986 and RFC 3987.

  For more information on IRI support, see the Remarks section for the class.

  Converts a string to its escaped representation.

  The escaped representation of the string.

  The string to transform to its escaped representation. 0
- Method
  2.0.0.0
  4.0.0.0
  System.String ``

  Use the method to prepare an unescaped URI string to be a parameter to the constructor.

  By default, the method converts all characters, except RFC 2396 unreserved characters, to their hexadecimal representation. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the method converts all characters, except for RFC 3986 unreserved characters, to their hexadecimal representation. All Unicode characters are converted to UTF-8 format before being escaped.

  This method assumes that has no escape sequences in it.

  By default, the string is escaped according to RFC 2396. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the string is escaped according to RFC 3986 and RFC 3987. See these RFCs for a definition of reserved and unreserved characters.

  For more information on IRI support, see the Remarks section for the class.

  Converts a URI string to its escaped representation.

  A that contains the escaped representation of .

  The string to escape.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing any fragment information contained in the URI used to construct the current instance.

  The following example demonstrates the use of the property.

  `using System; public class UriTest { public static void Main() { Uri baseUri = new Uri("http://www.contoso.com/"); Uri myUri = new Uri(baseUri, "index.htm#main"); Console.WriteLine(myUri.Fragment); } }`

  The output is

  #main

  The property gets any text following a fragment marker (#) in the URI, including the fragment marker itself. Given the URI http://www.contoso.com/index.htm#main, the property would return #main.

  The property is not considered in any comparison.

  Gets the escaped URI fragment.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` is not a valid hexadecimal digit (0-9, a-f, A-F).

  The method converts a character representing a hexadecimal digit (0-9, a-f, A-F) to its decimal value (0 to 15). If is not a valid hexadecimal digit, an exception is thrown.

  Gets the decimal value of a hexadecimal digit.

  An value that contains a number from 0 to 15 that corresponds to the specified hexadecimal digit.

  The hexadecimal digit (0-9, a-f, A-F) to convert. 0
- Method
  2.0.0.0
  4.0.0.0
  System.String `` ``

  When or is specified alone, the return value includes the delimiter. The , , , , and components do not include the delimiter. For all other values, and combinations of values, the delimiters are included in the returned value.

  The components are returned in the order that they appear in the URI. For example, if is specified, it appears first.

  When International Resource Identifier (IRI) and Internationalized Domain Name (IDN) support are enabled, the number of characters returned in the increases. Punycode names used to support IRI contain only ASCII characters and always start with the xn-- prefix. When IRI and IDN are enabled, Unicode surrogate characters are handled correctly by the method.

  For more information on IRI support, see the Remarks section for the class.

  If the method is called with set to , you cannot use the return value as an argument to a constructor to create an equivalent .

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

  A that contains the components.

  A bitwise combination of the values that specifies which parts of the current instance to return to the caller. One of the values that controls how special characters are escaped.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32

  The hash code is generated without the fragment component. For example, the URIs "http://www.contoso.com/index.htm#search" and "http://www.contoso.com/index.htm" produce the same hash code.

  The algorithm used to generate the hash code is unspecified.

  This method overrides .

  Gets the hash code for the URI.

  An containing the hash value generated for this URI.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String `` The parameter is not a valid value.

  The following example demonstrates the method.

  `using System; public class UriTest { public static void Main() { string[] myUri = { "http://www.contoso.com/index.htm", "http:www.contoso.com/index.htm#mark", "mailto:user@contoso.com?subject=uri", "nntp://news.contoso.com/123456@contoso.com" }; foreach (string s in myUri) { Uri aUri = new Uri(s); Console.WriteLine("URI: {0}", aUri.ToString()); Console.WriteLine("Scheme: {0}",aUri.GetLeftPart(UriPartial.Scheme)); Console.WriteLine("Authority: {0}",aUri.GetLeftPart(UriPartial.Authority)); Console.WriteLine("Path: {0}",aUri.GetLeftPart(UriPartial.Path)); } } }`

  The output is

  URI: http://www.contoso.com/index.htm

  Scheme: http://

  Authority: http://www.contoso.com

  Path: http://www.contoso.com/index.htm

  URI: http://www.contoso.com/index.htm#mark

  Scheme: http://

  Authority: http://www.contoso.com

  Path: http://www.contoso.com/index.htm

  URI: mailto:user@contoso.com?subject=uri

  Scheme: mailto:

  Authority:

  Path: mailto:user@contoso.com

  URI: nntp://news.contoso.com/123456@contoso.com

  Scheme: nntp://

  Authority: nntp://news.contoso.com

  Path: nntp://news.contoso.com/123456@contoso.com

  The method returns a string containing the leftmost portion of the URI string, ending with the portion specified by .

  includes delimiters in the following cases:

  includes the scheme delimiter.

  does not include the path delimiter.

  includes any delimiters in the original URI up to the query or fragment delimiter.

  includes the , plus the query and its delimiter.

  The following examples show a URI and the results of calling with , , , or .

  URI

  Scheme

  Authority

  Path

  Query

  http://www.contoso.com/index.htm?date=today

  http://

  http://www.contoso.com

  http://www.contoso.com/index.htm

  http://www.contoso.com/index.htm?date=today

  http://www.contoso.com/index.htm#main

  http://

  http://www.contoso.com

  http://www.contoso.com/index.htm

  http://www.contoso.com/index.htm

  mailto:user@contoso.com?subject=uri

  mailto:

  mailto:user@contoso.com

  mailto:user@contoso.com?subject=uri

  <none>

  nntp://news.contoso.com/123456@contoso.com

  nntp://

  nntp://news.contoso.com

  nntp://news.contoso.com/123456@contoso.com

  nntp://news.contoso.com/123456@contoso.com

  news:123456@contoso.com

  news:

  news:123456@contoso.com

  news:123456@contoso.com

  <none>

  file://server/filename.ext

  file://

  file://server

  file://server/filename.ext

  file://server/filename.ext

  Gets the specified portion of a instance.

  A that contains the specified portion of the instance.

  One of the values that specifies the end of the URI portion to return. 0
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` To be added.

  Returns the data needed to serialize the current instance.

  A object containing the information required to serialize the . A object containing the source and destination of the serialized stream associated with the .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String ``

  The returned string is in the form "%XX", where X represents a hexadecimal digit (0-9, A-F).

  The numerical value of is greater than 255.

  Converts a specified character into its hexadecimal equivalent.

  The hexadecimal representation of the specified character.

  The character to convert to hexadecimal representation. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Char `` `` A containing the hexadecimal representation of a character. A containing the location in where the hexadecimal representation of a character begins.

  Converts a specified escaped hexadecimal representation of a character to the character.

  A containing a character. If the character pointed to by is a "%" and there are at least two characters following the "%", and the two characters are valid hexadecimal digits, the hexadecimal digits are converted to . Otherwise, the character at is returned. Valid hexadecimal digits are: 0-9, a-f, A-F.

  On return, the value of contains the index of the character following the one returned.

  To be added. 0, or >= the number of characters in pattern. 0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing the DNS host name or IP address of the host server. If the host information was not specified to the constructor, the value of this property is .

  The following example demonstrates using the property.

  `using System; public class UriTest { public static void Main() { Uri baseUri = new Uri("http://www.contoso.com:8080/"); Uri myUri = new Uri(baseUri, "shownew.htm?date=today"); Console.WriteLine(myUri.Host); } }`

  The output is

  www.contoso.com

  Unlike the property, this property value does not include the port number.

  Gets the host component of this instance.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.UriHostNameType

  A that indicates the format of the host address information in the current instance.

  This property is read-only.

  If is , the value of this property is .

  Gets the type of the host name specified in the URI.

  0
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  This property is true if the string or instance that was passed into the constructor can be parsed as an absolute instance, which contains a scheme, an authority, and a path. Otherwise, the instance is treated as relative and might omit the scheme or other URI components.

  Gets whether the instance is absolute.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Boolean ``

  The character is analyzed according to the rules for the NTFS file system.

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

  A value that is true if the specified character is invalid; otherwise false.

  The to test. 0
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  is used to compare the current instance to a specified to determine whether this URI is a base for the specified . When comparing two objects to determine a base relationship, the user information () is not evaluated. When comparing two URIs (uri1 and uri2), uri1 is the base of uri2 if, when you ignore everything in uri2 after the last slash (/), the two URIs are identical. Using http://host/path/path/file?query as the base URI, the following table shows whether it is a base for other URIs.

  URI

  http://host/path/path/file?query is base of

  http://host/path/path/file/

  yes

  http://host/path/path/#fragment

  yes

  http://host/path/path/MoreDir/"

  yes

  http://host/path/path/OtherFile?Query

  yes

  http://host/path/path/

  yes

  http://host/path/path/file

  yes

  http://host/path/path

  no

  http://host/path/path?query

  no

  http://host/path/path#Fragment

  no

  http://host/path/path2/

  no

  http://host/path/path2/MoreDir

  no

  http://host/path/File

  no

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

  true if the current instance is a base of ; otherwise, false.

  The specified instance to test.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  if the value in the property is the default port for the ; otherwise, .

  This property is read-only.

  For a list of default port values, see the property.

  Gets whether the port value of the URI is the default for this scheme.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Boolean ``

  This method returns for the following characters:

  Character(s)
  Description
  < 0x0020
  Any character with the ASCII value less than hexadecimal 0x20 (32).
  < 0x007f
  Any character with the ASCII value greater than hexadecimal 0x7f (127).
  <
  Less than sign.
  >
  Greater than sign.
  #
  Number sign (crosshatch, pound sign).
  %
  Percent.
  "

  Quotation mark.

  {
  Left curly brace.
  }
  Right curly brace.
  |
  Pipe sign (vertical bar).
  \
  Backward slash.
  ^
  Circumflex (caret).
  [
  Left square bracket.
  ]
  Right square bracket.
  `
  Grave accent.

  Gets whether the specified character should be escaped.

  A value that is true if the specified character should be escaped; otherwise, false.

  The to test. 0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  if the resource identified by the current is a file; otherwise, .

  The property is true when the property equals .

  Gets a value indicating whether the specified is a file URI.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  Hexadecimal digits are the digits 0 to 9 and the letters A-F or a-f.

  Determines whether a specified character is a valid hexadecimal digit.

  A value that is true if the character is a valid hexadecimal digit; otherwise false.

  The character to validate. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  The method checks for hexadecimal encoding that follows the pattern "%hexhex" in a string, where "hex" is a digit from 0 to 9 or a letter from A-F (case-insensitive).

  Determines whether a character in a string is hexadecimal encoded.

  A value that is true if is hexadecimal encoded at the specified location; otherwise, false.

  The string to check. The location in to check for hexadecimal encoding. 0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  if the host of the current instance is the reserved hostname "localhost" or the loop-back IP address (127.0.0.1); otherwise, .

  The following example demonstrates the property.

  `using System; public class UriTest { public static void Main() { Uri myUri = new Uri("http://127.0.0.1/index.htm", true); Console.WriteLine("{0} is loopback? {1}", myUri.ToString(), myUri.IsLoopback); myUri = new Uri("http://localhost/index.htm", true); Console.WriteLine("{0} is loopback? {1}", myUri.ToString(), myUri.IsLoopback); } }`

  The output is

  http://127.0.0.1/index.htm is loopback? True

  http://localhost/index.htm is loopback? True

  returns true if the URI specified when this instance was created was 127.0.0.1, loopback, or localhost, or if the URI did not specify host information (for example, file:///c:Dir/file.txt). All other URIs return false.

  Gets whether the specified references the local host.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.Boolean ``

  The following characters are reserved for the use in URI:

  Character
  Description
  ;
  Semi-colon.
  /
  Forward slash.
  :
  Colon.
  @
  At sign (commercial at).
  &
  Ampersand.
  =
  Equals sign.
  +
  Plus sign.
  $
  US Dollar sign.
  ,
  Comma.

  As described above.

  Override this method to customize the escaping behavior provided by the type.

  Use this method to determine if a character is reserved.

  Gets whether the specified character is a reserved character.

  A value that is true if the specified character is a reserved character otherwise, false.

  The to test. 0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  The property is true if the specified instance is a UNC path (such as \\server\folder or file://server/folder). This property always returns true if the URI has the file:// scheme and specifies a host component.

  Gets whether the specified is a universal naming convention (UNC) path.

- Method
  2.0.0.0
  4.0.0.0
  System.Boolean

  The string is considered to be well-formed in accordance with RFC 2396 and RFC 2732 by default. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the string is considered to be well-formed in accordance with RFC 3986 and RFC 3987

  The string is considered poorly formed, causing the method to return false, if any of the following conditions occur.

  Error

  Example

  The string is not correctly escaped.

  http://www.contoso.com/path???/file name

  The string is an absolute that represents an implicit file .

  c:\\directory\filename

  The string is an absolute URI that is missing a slash before the path.

  file://c:/directory/filename

  The string contains unescaped backslashes even if they are treated as forward slashes.

  http:\\host/path/file

  The string represents a hierarchical absolute and does not contain "://".

  www.contoso.com/path/file

  The parser for the indicates that the original string was not well-formed.

  The example depends on the scheme of the URI.

  By default, the string used to construct this are considered well-formed in accordance with RFC 2396 and RFC 2732.

  When International Resource Identifier (IRI) and Internationalized Domain Name (IDN) support are enabled, the string used to construct this are considered well-formed in accordance with RFC 3986 and RFC 3987. Punycode names used to support IRI contain only ASCII characters and always start with the xn-- prefix.

  For more information on IRI support, see the Remarks section for the class.

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

  A value that is true if the string was well-formed; else false.

- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  By default, the string is considered well-formed in accordance with RFC 2396 and RFC 2732. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the string is considered well-formed in accordance with RFC 3986 and RFC 3987.

  The string is considered poorly formed, causing the method to return false, if any of the following conditions occur

  Error

  Example

  The string is not correctly escaped.

  http://www.contoso.com/path???/file name

  The string is an absolute that represents an implicit file .

  c:\\directory\filename

  The string is an absolute URI that is missing a slash before the path.

  file://c:/directory/filename

  The string contains unescaped backslashes even if they will be treated as forward slashes

  http:\\host/path/file

  The string represents a hierarchical absolute and does not contain "://"

  www.contoso.com/path/file

  The parser for the indicates that the original string was not well-formed.

  The example depends on the scheme of the URI.

  For more information on IRI support, see the Remarks section for the class.

  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.

  A value that is true if the string was well-formed; else false.

  The string used to attempt to construct a . The type of the in .
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing the local representation of the resource identified by the current instance.

  The value returned by this property is unescaped. If the path is recognized as a Windows file path, all forward slashes (/) are replaced by backward slashes (\).

  For the URI file://computer/file.ext, the absolute path is /file.ext and the local path is \\computer\file.ext.

  Gets a local operating-system representation of a file name.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use MakeRelativeUri(Uri uri) instead.")
  System.String ``

  The following example demonstrates the method.

  `using System; public class UriTest { public static void Main() { Uri myUri = new Uri("http://www.contoso.com/Hello%20World.htm", true); Console.WriteLine(myUri.ToString()); Console.WriteLine(myUri.MakeRelative(new Uri ("http://www.contoso.com/index.htm"))); } }`

  The output is

  http://www.contoso.com/Hello World.htm

  index.htm

  The following table shows the URI instance, , and the results of calling .

  Current URI instance

  Return value

  http://www.contoso.com/

  http://www.contoso.com/test/test.htm

  test/test.htm

  http://www.contoso.com/test1/

  http://www.contoso.com/

  ../

  http://www.contoso.com:8000/

  http://www.contoso.com/test/test.htm

  http://www.contoso.com/test/test.htm

  http://username@www.contoso.com/

  http://www.contoso.com/test1/test1.txt

  test1/test1.txt

  User information, if present in the URI, is ignored.

  Determines the difference between two instances.

  If the hostname and scheme of this URI instance and are the same, then this method returns a that represents a relative URI that, when appended to the current URI instance, yields the parameter.

  If the hostname or scheme is different, then this method returns a that represents the parameter.

  The URI to compare to the current URI. 0
- Method
  2.0.0.0
  4.0.0.0
  System.Uri ``

  The following table shows the URI instance, , and the results of calling .

  Current URI instance

  Return value

  http://www.contoso.com/

  http://www.contoso.com/test/test.htm

  test/test.htm

  http://www.contoso.com/test1/

  http://www.contoso.com/

  ../

  http://www.contoso.com:8000/

  http://www.contoso.com/test/test.htm

  http://www.contoso.com/test/test.htm

  http://username@www.contoso.com/

  http://www.contoso.com/test1/test1.txt

  test1/test1.txt

  User information, if present in the URI, is ignored.

  Determines the difference between two instances.

  If the hostname and scheme of this URI instance and are the same, then this method returns a relative that, when appended to the current URI instance, yields .

  If the hostname or scheme is different, then this method returns a that represents the parameter.

  The URI to compare to the current URI.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  This overload uses the method to determine whether the two instances are equivalent. and content is ignored when making this comparison.

  Determines whether two instances have the same value.

  A value that is true if the instances are equivalent; otherwise, false.

  A instance to compare with . A instance to compare with .
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  This overload uses the method to determine whether the two instances are not equivalent. and content is ignored when making this comparison.

  Determines whether two instances do not have the same value.

  A value that is true if the two instances are not equal; otherwise, false. If either parameter is null, this method returns true.

  A instance to compare with . A instance to compare with .
- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  If the URI specified to the constructor contained leading or trailing spaces, these spaces are preserved.

  The value returned by this property differs from and . returns the canonically unescaped form of the URI. returns the canonically escaped form of the URI.

  When International Resource Identifier (IRI) and Internationalized Domain Name (IDN) support are enabled, returns the original non normalized string with Punycode host name if one was used to initialize the instance. Punycode names contain only ASCII characters and always start with the xn-- prefix.

  For more information on IRI support, see the Remarks section for the class.

  When a object is serialized, the is not preserved. The serialization process uses the fully escaped and canonicalized property when serializing. For a that contains an IPv6 address, the IPv6 address and the scope ID are included in the serialized object.

  Gets the original URI string that was passed to the constructor.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("The method has been deprecated. It is not used by the system.")
  System.Void

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

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

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

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

  The scheme of the URI is in an invalid format.

  -or-

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

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

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A that contains the values of the and properties.

  The following example uses the property to extract the path and query information from a instance.

  `using System; public class UriTest { public static void Main() { Uri baseUri = new Uri("http://www.contoso.com/"); Uri myUri = new Uri(baseUri, "catalog/shownew.htm?date=today"); Console.WriteLine(myUri.PathAndQuery); } }`

  The output is

  /catalog/shownew.htm?date=today

  The property contains the absolute path on the server and the query information sent with the request. It is identical to concatenating the and properties.

  The property is escaped according to RFC 2396 by default. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the property is escaped according to RFC 3986 and RFC 3987.

  For more information on IRI support, see the Remarks section for the class.

  Gets the and properties separated by a question mark (?).

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32

  A containing the port number, or -1 if no port is used by the URI . If no port was specified as part of the URI used to construct the current instance, the property returns the default port for the URI scheme.

  The port number defines the protocol port used for contacting the server referenced in the URI. If a port is not specified as part of the URI, the property returns the default value for the protocol. If there is no default port number, this property returns -1.

  Gets the port number of this URI.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing the query information included in the specified URI, or .

  The following example uses the property to extract the query from a URI.

  `using System; public class UriTest { public static void Main() { Uri baseUri = new Uri("http://www.contoso.com/"); Uri myUri = new Uri(baseUri, "catalog/shownew.htm?date=today"); Console.WriteLine(myUri.Query); } }`

  The output is

  ?date=today

  The property contains any query information included in the URI. Query information is separated from the path information by a question mark (?) and continues to the end of the URI. The query information returned includes the leading question mark.

  The query information is escaped according to RFC 2396 by default. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the query information is escaped according to RFC 3986 and RFC 3987.

  For more information on IRI support, see the Remarks section for the class.

  Gets any query information included in the specified URI.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing the URI scheme.

  The property returns the scheme used to initialize the instance. This property does not indicate that the scheme used to initialize the instance was recognized.

  The following table shows examples of some possible values returned by the property.

  Scheme

  Description

  file

  The resource is a file on the local computer.

  ftp

  The resource is accessed through FTP.

  gopher

  The resource is accessed through the Gopher protocol.

  http

  The resource is accessed through HTTP.

  https

  The resource is accessed through SSL-encrypted HTTP.

  ldap

  The resource is accessed through the LDAP protocol.

  mailto

  The resource is an e-mail address and accessed through the SMTP protocol.

  net.pipe

  The resource is accessed through a named pipe.

  net.tcp

  The resource is accessed from TCP endpoint.

  news

  The resource is accessed through the NNTP protocol.

  nntp

  The resource is accessed through the NNTP protocol.

  telnet

  The resource is accessed through the TELNET protocol.

  uuid

  The resource is accessed through a unique UUID endpoint name for communicating with a service.

  Gets the scheme name for this URI.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  This field is read-only. The value of this field is "://".

  Specifies the characters that separate the communication protocol scheme from the address portion of the URI. This field is read-only.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String[] To be added.

  The property returns an array of strings containing the "segments" (substrings) that form the URI's absolute path. The first segment is obtained by parsing the absolute path from its first character until you reach a slash (/) or the end of the path. Each additional segment begins at the first character after the preceding segment, and terminates with the next slash or the end of the path. (A URI's absolute path contains everything after the host and port and before the query and fragment.)

  The following example shows the absolute path and segments for two URIs. The second example illustrates that the fragment and query are not part of the absolute path and therefore are not segments.

  Absolute URI

  http://www.contoso.com/Chapters/Chapter1/Sections/Section1.htm

  Absolute path

  /Chapters/Chapter1/Sections/Section1.htm

  Segments

  /Chapters/Chapter1/Sections/Section1.htm

  Absolute URI

  http://www.contoso.com/Chapters/Chapter1/Sections/Section1.htm#page1?answer=NO

  Absolute path

  /Chapters/Chapter1/Sections/Section1.htm

  Segments

  /Chapters/Chapter1/Sections/Section1.htm

  Note that because the absolute path starts with a '/', the first segment contains it and nothing else.

  Gets an array containing the path segments that make up the specified URI.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` To be added. To be added. To be added.

  Returns the data needed to serialize the current instance.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  The string returned by this method does not contain port information when the port is the default port for the scheme.

  The string returned by the method may contain control characters, which can corrupt the state of a console application. You can use the method with the format to remove control characters from the returned string.

  Gets a canonical string representation for the specified instance.

  A instance that contains the unescaped canonical representation of the instance. All characters are unescaped except #, ?, and %.

  0
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete
  System.String ``

  Escape sequences can be hex-encoded reserved characters (for example "%40") or hex-encoded UTF-8 sequences (for example "%C4%D2").

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

  A that contains the unescaped value of the parameter.

  The to convert. 0
- Method
  2.0.0.0
  4.0.0.0
  System.String ``

  You should use this method with care. Unescaping a string that has been previously unescaped can lead to ambiguities and errors.

  Many Web browsers escape spaces inside of URIs into plus ("+") characters; however, the UnescapeDataString method does not convert plus characters into spaces because this behavior is not standard across all URI schemes.

  Converts a string to its unescaped representation.

  A that contains the unescaped representation of .

  The string to unescape.
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String file

  In .NET Framework version 1.1, a "file:///path" URI was translated to "file:/path". This has been corrected for version 2.0.

  Specifies that the URI is a pointer to a file. This field is read-only.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String ftp

  This field is read-only. The value of this field is "ftp".

  Specifies that the URI is accessed through the File Transfer Protocol (FTP). This field is read-only.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String gopher

  This field is read-only. The value of this field is "gopher".

  Specifies that the URI is accessed through the Gopher protocol. This field is read-only.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String http

  This field is read-only. The value of this field is "http".

  Specifies that the URI is accessed through the Hypertext Transfer Protocol (HTTP). This field is read-only.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String https

  This field is read-only. The value of this field is "https".

  Specifies that the URI is accessed through the Secure Hypertext Transfer Protocol (HTTPS). This field is read-only.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String mailto

  This field is read-only. The value of this field is "mailto".

  Specifies that the URI is an e-mail address and is accessed through the Simple Mail Transport Protocol (SMTP). This field is read-only.

  0
- Field
  2.0.0.0
  4.0.0.0
  System.String To be added.

  Specifies that the URI is accessed through the NetPipe scheme used by Windows Communication Foundation (WCF). This field is read-only.

- Field
  2.0.0.0
  4.0.0.0
  System.String To be added.

  Specifies that the URI is accessed through the NetTcp scheme used by Windows Communication Foundation (WCF). This field is read-only.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String news

  This field is read-only. The value of this field is "news".

  Specifies that the URI is an Internet news group and is accessed through the Network News Transport Protocol (NNTP). This field is read-only.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String nntp

  The NNTP parsing errors in .NET Framework version 1.1 have been corrected.

  Specifies that the URI is an Internet news group and is accessed through the Network News Transport Protocol (NNTP). This field is read-only.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  if the parameter of the constructor for the current instance was set to ; otherwise, .

  The property is set to true to indicate that the string used to create the instance was completely escaped before it was passed to the constructor; that is, the parameter of the constructor call was set to true.

  Indicates that the URI string was completely escaped before the instance was created.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing any user information included in the URI used to construct the current instance, or if no user information was included.

  The value returned by this property is usually in the format "userName:password".

  Gets the user name, password, or other user-specific information associated with the specified URI.

  0
0