Rune.Explicit 運算子

定義

多載

Explicit(Char to Rune)

定義從 16 位元 Unicode 字元到 Rune 的明確轉換。

Explicit(Int32 to Rune)

定義從 32 位元帶正負號的整數到 Rune 的明確轉換。

Explicit(UInt32 to Rune)

定義從 32 位元不帶正負號的整數到 Rune 的明確轉換。

Explicit(Char to Rune)

定義從 16 位元 Unicode 字元到 Rune 的明確轉換。

public:
 static explicit operator System::Text::Rune(char ch);
public static explicit operator System.Text.Rune (char ch);
static member op_Explicit : char -> System.Text.Rune
Public Shared Narrowing Operator CType (ch As Char) As Rune

參數

ch
Char

要轉換的 16 位元 Unicode 字元。

傳回

Rune

ch 為 32 位元 Unicode 字元。

例外狀況

ch 是代表代理字碼指標的 Unicode 純量。

適用於

Explicit(Int32 to Rune)

定義從 32 位元帶正負號的整數到 Rune 的明確轉換。

public:
 static explicit operator System::Text::Rune(int value);
public static explicit operator System.Text.Rune (int value);
static member op_Explicit : int -> System.Text.Rune
Public Shared Narrowing Operator CType (value As Integer) As Rune

參數

value
Int32

要轉換的 32 位元帶正負號的整數。

傳回

Rune

value 為 32 位元 Unicode 字元。

例外狀況

value 是無效的 Unicode 純量。

適用於

Explicit(UInt32 to Rune)

重要

此 API 不符合 CLS 規範。

定義從 32 位元不帶正負號的整數到 Rune 的明確轉換。

public:
 static explicit operator System::Text::Rune(System::UInt32 value);
[System.CLSCompliant(false)]
public static explicit operator System.Text.Rune (uint value);
[<System.CLSCompliant(false)>]
static member op_Explicit : uint32 -> System.Text.Rune
Public Shared Narrowing Operator CType (value As UInteger) As Rune

參數

value
UInt32

要轉換的 32 位元帶正負號的整數。

傳回

Rune

value 為 32 位元 Unicode 字元。

屬性

例外狀況

value 是無效的 Unicode 純量。

適用於