mscorlib 2.0.0.0 2.0.0.0 4.0.0.0 System.Object

An Internet domain name consists of one or more parts, called domain name labels, separated by label separators. For example, the domain name "www.proseware.com" consists of the labels, "www", "proseware", and "com", separated by periods. Standard domain names consist of designated characters in the US-ASCII (or Basic Latin) character range, from U+0021 to U+007E. To facilitate Internet usage in cultures that do not use the US-ASCII character set, the Internationalizing Domain Names in Applications (IDNA) standard was adopted in 2003 to support the inclusion of Unicode characters outside the US-ASCII character range. However, name servers and domain name resolution continue to rely on characters within the US-ASCII character range.

The IDNA mechanism uses Punycode to map an internationalized domain name that contains Unicode characters outside the US-ASCII character range to the US-ASCII character range supported by the domain name system. The IDNA mechanism is used to convert only domain names, not data transmitted over the Internet.

In the net_v45, the class supports different versions of the IDNA standard, depending on the operating system in use:

When run on win8, it supports the 2008 version of the IDNA standard outlined by RFC 5891: Internationalized Domain Names in Applications (IDNA): Protocol.

When run on earlier versions of the Windows operating system, it supports the 2003 version of the standard outlined by RFC 3490: Internationalizing Domain Names in Applications (IDNA).

See Unicode Technical Standard #46: IDNA Compatibility Processing for the differences in the way these standards handle particular sets of characters.

The method normalizes a domain name, converts the normalized name to a representation that consists of displayable Unicode characters in the US-ASCII code point range (U+0020 to U+007E), and prepends an ASCII-compatible encoding (ACE) prefix ("xn--") to each label. The method restores the domain name labels converted by the method.

If the string to be converted includes the label separator characters IDEOGRAPHIC FULL STOP (U+3002), FULLWIDTH FULL STOP (U+FF0E), and HALFWIDTH IDEOGRAPHIC FULL STOP (U+FF61), the method converts them to the label separator FULL STOP (period, U+002E). The method, however, does not restore the original label separator character.

Supports the use of non-ASCII characters for Internet domain names. This class cannot be inherited.

- Constructor
  2.0.0.0
  4.0.0.0

  The and properties are initialized to false. A small subset of ASCII characters other than A-Z, 0-9, the hyphen (-) character (U+002D), and the period (.) character are permitted in domain names, but unassigned Unicode code points are not.

  Initializes a new instance of the class.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  A registered domain name cannot contain unassigned code points. Consequently, the default value of the property is false. The IDNA specification permits unassigned code points only in queries for matching strings (that is, in domain name lookup). For more information about the use of unassigned code points in domain names, see RFC 3454, "Preparation of Internationalized Strings (stringprep)" and RFC 5891, "Internationalized Domain Names in Applications (IDNA): Protocol".

  If the property is false, the behavior associated with the property depends on the underlying operating system. On win8, the class conforms to IDNA 2008, which is based on the Unicode 6.0 standard. On previous versions of Windows, the class is based on IDNA 2003, which is based on Unicode 3.x. Some code points that were unassigned in IDNA 2003 have been assigned characters and are supported in IDNA 2008. For example, U+0221 was introduced in Unicode 4.0. On win8, it is encoded as "xn—6la". On previous versions of Windows, it throws an exception.

  Gets or sets a value that indicates whether unassigned Unicode code points are used in operations performed by members of the current object.

- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` To be added.

  Indicates whether a specified object and the current object are equal.

  true if the object specified by the parameter is derived from and its and properties are equal; otherwise, false.

  The object to compare to the current object.
- Method
  2.0.0.0
  4.0.0.0
  System.String ``

  The parameter specifies a string of one or more labels that consist of valid Unicode characters. The labels are separated by label separators. The parameter cannot begin with a label separator, but it can include and optionally end with a separator. The label separators are FULL STOP (period, U+002E), IDEOGRAPHIC FULL STOP (U+3002), FULLWIDTH FULL STOP (U+FF0E), and HALFWIDTH IDEOGRAPHIC FULL STOP (U+FF61). For example, the domain name "www.adatum.com" consists of the labels, "www", "adatum", and "com", separated by periods.

  A label cannot contain any of the following characters:

  Unicode control characters from U+0001 through U+001F, and U+007F.

  Unassigned Unicode characters, if the value of the property is false.

  Non-standard characters in the US-ASCII character range, such as the SPACE (U+0020), EXCLAMATION MARK (U+0021), and LOW LINE (U+005F) characters, if the value of the property is true.

  Characters that are prohibited by a specific version of the IDNA standard. For more information about prohibited characters, see RFC 3454: Preparation of Internationalized Strings ("stringprep") for IDNA 2003, and RFC 5982: The Unicode Code Points and Internationalized Domain Names for Applications for IDNA 2008.

  The method converts all label separators to FULL STOP (period, U+002E).

  If contains no characters outside the US-ASCII character range and no characters within the US-ASCII character range are prohibited, the method returns unchanged.

  Encodes a string of domain name labels that consist of Unicode characters to a string of displayable Unicode characters in the US-ASCII character range. The string is formatted according to the IDNA standard.

  The equivalent of the string specified by the parameter, consisting of displayable Unicode characters in the US-ASCII character range (U+0020 to U+007E) and formatted according to the IDNA standard.

  The string to convert, which consists of one or more domain name labels delimited with label separators.
- Method
  2.0.0.0
  4.0.0.0
  System.String `` ``

  The and parameters define a substring with one or more labels that consist of valid Unicode characters. The labels are separated by label separators. The first character of the substring cannot begin with a label separator, but it can include and optionally end with a separator. The label separators are FULL STOP (period, U+002E), IDEOGRAPHIC FULL STOP (U+3002), FULLWIDTH FULL STOP (U+FF0E), and HALFWIDTH IDEOGRAPHIC FULL STOP (U+FF61). For example, the domain name "www.adatum.com" consists of the labels, "www", "adatum", and "com", separated by periods.

  A label cannot contain any of the following characters:

  Unicode control characters from U+0001 through U+001F, and U+007F.

  Unassigned Unicode characters, depending on the value of the property.

  Non-standard characters in the US-ASCII character range, such as the SPACE (U+0020), EXCLAMATION MARK (U+0021), and LOW LINE (U+005F) characters, depending on the value of the property.

  Characters that are prohibited by a specific version of the IDNA standard. For more information about prohibited characters, see RFC 3454: Preparation of Internationalized Strings ("stringprep") for IDNA 2003, and RFC 5982: The Unicode Code Points and Internationalized Domain Names for Applications for IDNA 2008.

  The method converts all label separators to FULL STOP (period, U+002E).

  If contains no characters outside the US-ASCII character range and no characters within the US-ASCII character range are prohibited, the method returns unchanged.

  Encodes a substring of domain name labels that include Unicode characters outside the US-ASCII character range. The substring is converted to a string of displayable Unicode characters in the US-ASCII character range and is formatted according to the IDNA standard.

  The equivalent of the substring specified by the and parameters, consisting of displayable Unicode characters in the US-ASCII character range (U+0020 to U+007E) and formatted according to the IDNA standard.

  The string to convert, which consists of one or more domain name labels delimited with label separators. A zero-based offset into that specifies the start of the substring to convert. The conversion operation continues to the end of the string.
- Method
  2.0.0.0
  4.0.0.0
  System.String `` `` ``

  The , , and parameters define a substring with one or more labels that consist of valid Unicode characters. The labels are separated by label separators. The first character of the substring cannot begin with a label separator, but it can include and optionally end with a separator. The label separators are FULL STOP (period, U+002E), IDEOGRAPHIC FULL STOP (U+3002), FULLWIDTH FULL STOP (U+FF0E), and HALFWIDTH IDEOGRAPHIC FULL STOP (U+FF61). For example, the domain name "www.adatum.com" consists of the labels, "www", "adatum", and "com", separated by periods.

  A label cannot contain any of the following characters:

  Unicode control characters from U+0001 through U+001F, and U+007F.

  Unassigned Unicode characters, depending on the value of the property.

  Non-standard characters in the US-ASCII character range, such as the SPACE (U+0020), EXCLAMATION MARK (U+0021), and LOW LINE (U+005F) characters, depending on the value of the property.

  Characters that are prohibited by a specific version of the IDNA standard. For more information about prohibited characters, see RFC 3454: Preparation of Internationalized Strings ("stringprep") for IDNA 2003, and RFC 5982: The Unicode Code Points and Internationalized Domain Names for Applications for IDNA 2008.

  The method converts all label separators to FULL STOP (period, U+002E). If the substring contains no characters outside the US-ASCII character range, and no characters within the US-ASCII character range are prohibited, the method returns the substring unchanged.

  Encodes the specified number of characters in a substring of domain name labels that include Unicode characters outside the US-ASCII character range. The substring is converted to a string of displayable Unicode characters in the US-ASCII character range and is formatted according to the IDNA standard.

  The equivalent of the substring specified by the , , and parameters, consisting of displayable Unicode characters in the US-ASCII character range (U+0020 to U+007E) and formatted according to the IDNA standard.

  The string to convert, which consists of one or more domain name labels delimited with label separators. A zero-based offset into that specifies the start of the substring. The number of characters to convert in the substring that starts at the position specified by in the string.
- Method
  2.0.0.0
  4.0.0.0
  System.Int32

  Override the method if your application needs to implement a meaningful hash code algorithm.

  Returns a hash code for this object.

  One of four 32-bit signed constants derived from the properties of an object. The return value has no special meaning and is not suitable for use in a hash code algorithm.

- Method
  2.0.0.0
  4.0.0.0
  System.String ``

  For more information about domain names, labels, and label separators, see the remarks for the method.

  Decodes a string of one or more domain name labels, encoded according to the IDNA standard, to a string of Unicode characters.

  The Unicode equivalent of the IDNA substring specified by the parameter.

  The string to decode, which consists of one or more labels in the US-ASCII character range (U+0020 to U+007E) encoded according to the IDNA standard.
- Method
  2.0.0.0
  4.0.0.0
  System.String `` ``

  For more information about domain names, labels, and label separators, see the remarks for the method.

  Decodes a substring of one or more domain name labels, encoded according to the IDNA standard, to a string of Unicode characters.

  The Unicode equivalent of the IDNA substring specified by the and parameters.

  The string to decode, which consists of one or more labels in the US-ASCII character range (U+0020 to U+007E) encoded according to the IDNA standard. A zero-based offset into that specifies the start of the substring to decode. The decoding operation continues to the end of the string.
- Method
  2.0.0.0
  4.0.0.0
  System.String `` `` ``

  For more information about domain names, labels, and label separators, see the remarks for the method.

  Decodes a substring of a specified length that contains one or more domain name labels, encoded according to the IDNA standard, to a string of Unicode characters.

  The Unicode equivalent of the IDNA substring specified by the , , and parameters.

  The string to decode, which consists of one or more labels in the US-ASCII character range (U+0020 to U+007E) encoded according to the IDNA standard. A zero-based offset into that specifies the start of the substring. The number of characters to convert in the substring that starts at the position specified by in the string.
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  Domain names that follow standard naming rules consist of a specific subset of characters in the US-ASCII character range. The characters are the letters A through Z, the digits 0 through 9, the hyphen (-) character (U+002D), and the period (.) character. The case of the characters is not significant. Relaxed naming conventions allow the use of a broader range of ASCII characters, including the space character (U+0020), the exclamation point character (U+0021), and the underbar character (U+005F). If is true, only standard characters can appear in a label returned by the method.

  By default, the value of the property is false, and an expanded subset of ASCII characters is permitted in a label.

  The class prohibits the use of the nondisplayable characters U+0000 through U+001F, and U+007F in domain name labels regardless of the setting of the property. This prohibition reduces the risk of security attacks such as name spoofing.

  Gets or sets a value that indicates whether standard or relaxed naming conventions are used in operations performed by members of the current object.