Rune Constructors

Definition

Overloads

Rune(Char)

从提供的 UTF-16 代码单元中创建 RuneCreates a Rune from the provided UTF-16 code unit.

Rune(Int32)

从表示 Unicode 标量值的指定 32 位整数中创建 RuneCreates a Rune from the specified 32-bit integer that represents a Unicode scalar value.

Rune(UInt32)

从表示 Unicode 标量值的指定 32 位无符号整数中创建 RuneCreates a Rune from the specified 32-bit unsigned integer that represents a Unicode scalar value.

Rune(Char, Char)

从提供的 UTF-16 代理项对中创建 RuneCreates a Rune from the provided UTF-16 surrogate pair.

Rune(Char)

从提供的 UTF-16 代码单元中创建 RuneCreates a Rune from the provided UTF-16 code unit.

public:
 Rune(char ch);
public Rune (char ch);
new System.Text.Rune : char -> System.Text.Rune
Public Sub New (ch As Char)

Parameters

ch
Char

UTF-16 代码单元。A UTF-16 code unit.

Exceptions

ch 表示 UTF-16 代理项码位(U+D800..U+DFFF,含首尾值)。ch represents a UTF-16 surrogate code point (U+D800..U+DFFF, inclusive).

Rune(Int32)

从表示 Unicode 标量值的指定 32 位整数中创建 RuneCreates a Rune from the specified 32-bit integer that represents a Unicode scalar value.

public:
 Rune(int value);
public Rune (int value);
new System.Text.Rune : int -> System.Text.Rune
Public Sub New (value As Integer)

Parameters

value
Int32

一个 Unicode 标量值。A Unicode scalar value.

Exceptions

value 不表示 Unicode 标量值。value does not represent a Unicode scalar value.

Rune(UInt32)

Important

This API is not CLS-compliant.

从表示 Unicode 标量值的指定 32 位无符号整数中创建 RuneCreates a Rune from the specified 32-bit unsigned integer that represents a Unicode scalar value.

public:
 Rune(System::UInt32 value);
[System.CLSCompliant(false)]
public Rune (uint value);
new System.Text.Rune : uint32 -> System.Text.Rune
Public Sub New (value As UInteger)

Parameters

value
UInt32

一个 Unicode 标量值。A Unicode scalar value.

Attributes

Exceptions

value 不表示 Unicode 标量值。value does not represent a Unicode scalar value.

Rune(Char, Char)

从提供的 UTF-16 代理项对中创建 RuneCreates a Rune from the provided UTF-16 surrogate pair.

public:
 Rune(char highSurrogate, char lowSurrogate);
public Rune (char highSurrogate, char lowSurrogate);
new System.Text.Rune : char * char -> System.Text.Rune
Public Sub New (highSurrogate As Char, lowSurrogate As Char)

Parameters

highSurrogate
Char

代理项对的高代理项。The high surrogate of the surrogate pair.

lowSurrogate
Char

代理项对的低代理项。The low surrogate of the surrogate pair.

Exceptions

highSurrogate 不表示 UTF-16 高代理项码位。highSurrogate does not represent a UTF-16 high surrogate code point.

- 或 --or-

lowSurrogate 不表示 UTF-16 低代理项码位。lowSurrogate does not represent a UTF-16 low surrogate code point.

Applies to