Rune.TryCreate 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
尝试从表示 Unicode 标量值的指定带符号整数创建 Rune 一个。
重载
| 名称 | 说明 |
|---|---|
| TryCreate(Int32, Rune) |
尝试从表示 Unicode 标量值的指定带符号整数创建 Rune 一个。 |
| TryCreate(Char, Rune) |
尝试从指定的字符创建一个 Rune 值,并返回一个值,该值指示操作是否成功。 |
| TryCreate(Char, Char, Rune) |
尝试从指定的 UTF-16 代理项对创建一个 Rune ,并返回一个值,该值指示操作是否成功。 |
| TryCreate(UInt32, Rune) |
尝试从表示 Unicode 标量值的指定 32 位无符号整数创建 Rune 一个。 |
TryCreate(Int32, Rune)
- Source:
- Rune.cs
- Source:
- Rune.cs
- Source:
- Rune.cs
- Source:
- Rune.cs
- Source:
- 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
此方法返回时,对应于的 rune value。
返回
true 如果方法成功,则为否则,为 false.
适用于
TryCreate(Char, Rune)
- Source:
- Rune.cs
- Source:
- Rune.cs
- Source:
- Rune.cs
- Source:
- Rune.cs
- Source:
- 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
此方法返回时,对应于的 rune ch。
返回
true 如果方法成功,则为否则,为 false.
适用于
TryCreate(Char, Char, Rune)
- Source:
- Rune.cs
- Source:
- Rune.cs
- Source:
- Rune.cs
- Source:
- Rune.cs
- Source:
- 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 如果操作成功,则为 false 如果输入值不表示格式正确的 UTF-16 代理项对,则为 。
适用于
TryCreate(UInt32, Rune)
- Source:
- Rune.cs
- Source:
- Rune.cs
- Source:
- Rune.cs
- Source:
- Rune.cs
- Source:
- 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
此方法返回时,对应于的 rune value。
返回
true 如果方法成功,则为否则,为 false.
- 属性