Rune.TryCreate 方法

定義

多載

TryCreate(Char, Rune)

嘗試從指定的字元建立 Rune 並傳回值,指出作業是否成功。

TryCreate(UInt32, Rune)

嘗試從表示 Unicode 純量值的所指定 32 位元不帶正負號整數建立 Rune

TryCreate(Char, Char, Rune)

嘗試從指定的 UTF-16 代理字組建立 Rune 並傳回值,指出作業是否成功。

TryCreate(Int32, Rune)

嘗試從表示 Unicode 純量值的所指定帶正負號整數建立 Rune

TryCreate(Char, Rune)

來源:
Rune.cs
來源:
Rune.cs
來源:
Rune.cs

嘗試從指定的字元建立 Rune 並傳回值,指出作業是否成功。

public:
 static bool TryCreate(char ch, [Runtime::InteropServices::Out] System::Text::Rune % result);
public static bool TryCreate (char ch, out System.Text.Rune result);
static member TryCreate : char * Rune -> bool
Public Shared Function TryCreate (ch As Char, ByRef result As Rune) As Boolean

參數

ch
Char

用來建立 rune 的字元。

result
Rune

當此方法傳回時,會是對應至 ch 的 rune。

傳回

如果方法成功,則為 true,否則為 false

適用於

TryCreate(UInt32, Rune)

來源:
Rune.cs
來源:
Rune.cs
來源:
Rune.cs

重要

此 API 不符合 CLS 規範。

嘗試從表示 Unicode 純量值的所指定 32 位元不帶正負號整數建立 Rune

public:
 static bool TryCreate(System::UInt32 value, [Runtime::InteropServices::Out] System::Text::Rune % result);
[System.CLSCompliant(false)]
public static bool TryCreate (uint value, out System.Text.Rune result);
[<System.CLSCompliant(false)>]
static member TryCreate : uint32 * Rune -> bool
Public Shared Function TryCreate (value As UInteger, ByRef result As Rune) As Boolean

參數

value
UInt32

Unicode 純量值。

result
Rune

當此方法傳回時,會是對應至 value 的 rune。

傳回

如果方法成功,則為 true,否則為 false

屬性

適用於

TryCreate(Char, Char, Rune)

來源:
Rune.cs
來源:
Rune.cs
來源:
Rune.cs

嘗試從指定的 UTF-16 代理字組建立 Rune 並傳回值,指出作業是否成功。

public:
 static bool TryCreate(char highSurrogate, char lowSurrogate, [Runtime::InteropServices::Out] System::Text::Rune % result);
public static bool TryCreate (char highSurrogate, char lowSurrogate, out System.Text.Rune result);
static member TryCreate : char * char * Rune -> bool
Public Shared Function TryCreate (highSurrogate As Char, lowSurrogate As Char, ByRef result As Rune) As Boolean

參數

highSurrogate
Char

代理字組的高代理字元。

lowSurrogate
Char

代理字組的低代理字元。

result
Rune

對應至指定代理字組的 rune。

傳回

如果作業成功,則為 true;如果輸入值不表示語式正確的 UTF-16 代理字組,則為 false

適用於

TryCreate(Int32, Rune)

來源:
Rune.cs
來源:
Rune.cs
來源:
Rune.cs

嘗試從表示 Unicode 純量值的所指定帶正負號整數建立 Rune

public:
 static bool TryCreate(int value, [Runtime::InteropServices::Out] System::Text::Rune % result);
public static bool TryCreate (int value, out System.Text.Rune result);
static member TryCreate : int * Rune -> bool
Public Shared Function TryCreate (value As Integer, ByRef result As Rune) As Boolean

參數

value
Int32

Unicode 純量值。

result
Rune

當此方法傳回時,會是對應至 value 的 rune。

傳回

如果方法成功,則為 true,否則為 false

適用於