This method is used to converts the specified Unicode code point into a UTF-16 encoded string.
public static string ConvertFromUtf32 (int utf32);
Here, utf32 is a 21-bit Unicode code point.
Return Value: This method 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.
Exception: This method returns the
ArgumentOutOfRangeException if utf32 is not a valid 21-bit Unicode code point ranging from U+0 through U+10FFFF, excluding the surrogate pair range from U+D800 through U+DFFF.
Below programs illustrate the use of Char.ConvertFromUtf32(Int32) Method:
value is B
Example 2: For ArgumentOutOfRangeException
0x11FFFF is excedding the limit Exception Thrown: System.ArgumentOutOfRangeException
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.