Rune.Explicit Operator

Definition

Overloads

Explicit(Char to Rune)

Defines an explicit conversion of a 16-bit Unicode character to a Rune.

Explicit(Int32 to Rune)

Defines an explicit conversion of a 32-bit signed integer to a Rune.

Explicit(UInt32 to Rune)

Defines an explicit conversion of a 32-bit unsigned integer to a Rune.

Explicit(Char to Rune)

Source:
Rune.cs
Source:
Rune.cs
Source:
Rune.cs

Defines an explicit conversion of a 16-bit Unicode character to a Rune.

C#
public static explicit operator System.Text.Rune(char ch);

Parameters

ch
Char

The 16-bit Unicode character to convert.

Returns

ch as a 32-bit Unicode character.

Exceptions

ch is a Unicode scalar that represents a surrogate code point.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9

Explicit(Int32 to Rune)

Source:
Rune.cs
Source:
Rune.cs
Source:
Rune.cs

Defines an explicit conversion of a 32-bit signed integer to a Rune.

C#
public static explicit operator System.Text.Rune(int value);

Parameters

value
Int32

The 32-bit signed integer to convert.

Returns

value as a 32-bit Unicode character.

Exceptions

value is an invalid Unicode scalar.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9

Explicit(UInt32 to Rune)

Source:
Rune.cs
Source:
Rune.cs
Source:
Rune.cs

Important

This API is not CLS-compliant.

Defines an explicit conversion of a 32-bit unsigned integer to a Rune.

C#
[System.CLSCompliant(false)]
public static explicit operator System.Text.Rune(uint value);

Parameters

value
UInt32

The 32-bit signed integer to convert.

Returns

value as a 32-bit Unicode character.

Attributes

Exceptions

value is an invalid Unicode scalar.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9