System.Char.ConvertFromUtf32 Method

Converts the specified Unicode code point into a UTF-16 encoded string.

Syntax

public static string ConvertFromUtf32 (int utf32)

Parameters

utf32
A 21-bit Unicode code point.

Returns

A string consisting of one char object or a surrogate pair of char objects equivalent to the code point specified by the utf32 parameter.

Remarks

Use this method to convert a 21-bit Unicode code point to a UTF-16 encoded string before testing the string with methods such as char.IsLowSurrogate(char) and char.IsHighSurrogate(char).

A valid code point outside the Basic Multilingual Plane (BMP) always yields a valid surrogate pair. However, a valid code point within the BMP might not yield a valid result according to the Unicode standard because no linguistic processing is used in the conversion. For that reason, use the System.Text.UTF32Encoding class to convert bulk UTF-32 data into bulk UTF-16 data.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0