Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Globalization.​IdnMapping

Assembly: System.Runtime

Inheritance: object → IdnMapping

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

Properties

public bool
AllowUnassigned
Gets or sets a value that indicates whether unassigned Unicode code points are used in operations performed by members of the current <see cref="T:System.Globalization.IdnMapping" /> object.
public bool
UseStd3AsciiRules
Gets or sets a value that indicates whether standard or relaxed naming conventions are used in operations performed by members of the current <see cref="T:System.Globalization.IdnMapping" /> object.

Methods

public bool
Equals​(object obj)
obj The object to compare to the current object.
Returns <see langword="true" /> if the object specified by the <paramref name="obj" /> parameter is derived from <see cref="T:System.Globalization.IdnMapping" /> and its <see cref="P:System.Globalization.IdnMapping.AllowUnassigned" /> and <see cref="P:System.Globalization.IdnMapping.UseStd3AsciiRules" /> properties are equal; otherwise, <see langword="false" /> .
Indicates whether a specified object and the current <see cref="T:System.Globalization.IdnMapping" /> object are equal.
public string
GetAscii​(string unicode)
unicode The string to convert, which consists of one or more domain name labels delimited with label separators.
Returns The equivalent of the string specified by the <paramref name="unicode" /> parameter, consisting of displayable Unicode characters in the US-ASCII character range (U+0020 to U+007E) and formatted according to the IDNA standard.
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.
public string
GetAscii​(string unicode, int index)
unicode The string to convert, which consists of one or more domain name labels delimited with label separators.
index A zero-based offset into <paramref name="unicode" /> that specifies the start of the substring to convert. The conversion operation continues to the end of the <paramref name="unicode" /> string.
Returns The equivalent of the substring specified by the <paramref name="unicode" /> and <paramref name="index" /> parameters, consisting of displayable Unicode characters in the US-ASCII character range (U+0020 to U+007E) and formatted according to the IDNA standard.
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.
public string
GetAscii​(string unicode, int index, int count)
unicode The string to convert, which consists of one or more domain name labels delimited with label separators.
index A zero-based offset into <paramref name="unicode" /> that specifies the start of the substring.
count The number of characters to convert in the substring that starts at the position specified by <paramref name="index" /> in the <paramref name="unicode" /> string.
Returns The equivalent of the substring specified by the <paramref name="unicode" /> , <paramref name="index" /> , and <paramref name="count" /> parameters, consisting of displayable Unicode characters in the US-ASCII character range (U+0020 to U+007E) and formatted according to the IDNA standard.
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.
public int
GetHashCode​()
Returns One of four 32-bit signed constants derived from the properties of an <see cref="T:System.Globalization.IdnMapping" /> object. The return value has no special meaning and is not suitable for use in a hash code algorithm.
Returns a hash code for this <see cref="T:System.Globalization.IdnMapping" /> object.
public string
GetUnicode​(string ascii)
ascii 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.
Returns The Unicode equivalent of the IDNA substring specified by the <paramref name="ascii" /> parameter.
Decodes a string of one or more domain name labels, encoded according to the IDNA standard, to a string of Unicode characters.
public string
GetUnicode​(string ascii, int index)
ascii 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.
index A zero-based offset into <paramref name="ascii" /> that specifies the start of the substring to decode. The decoding operation continues to the end of the <paramref name="ascii" /> string.
Returns The Unicode equivalent of the IDNA substring specified by the <paramref name="ascii" /> and <paramref name="index" /> parameters.
Decodes a substring of one or more domain name labels, encoded according to the IDNA standard, to a string of Unicode characters.
public string
GetUnicode​(string ascii, int index, int count)
ascii 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.
index A zero-based offset into <paramref name="ascii" /> that specifies the start of the substring.
count The number of characters to convert in the substring that starts at the position specified by <paramref name="index" /> in the <paramref name="ascii" /> string.
Returns The Unicode equivalent of the IDNA substring specified by the <paramref name="ascii" /> , <paramref name="index" /> , and <paramref name="count" /> parameters.
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.
protected void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .
public string
ToString​()
Inherited from object
Returns A string that represents the current object.
Returns a string that represents the current object.