C# 中的 Char.ConvertFromUtf32(Int32) 方法
C# 中的 Char.ConvertFromUtf32(Int32) 方法用於將指定的 Unicode 碼點轉換為 UTF-16 編碼的字串。
語法
以下是語法 −
public static string ConvertFromUtf32 (int utf32);
上述引數 utf32 是 21 位 Unicode 碼點。
示例
現在我們來看一個示例來實現 Char.ConvertFromUtf32(Int32) 方法 −
using System; public class Demo { public static void Main(){ int utf = 0x0051; string str = Char.ConvertFromUtf32(utf); Console.WriteLine("Value = "+str); } }
輸出
這將生成以下輸出 −
Value = Q
示例
現在我們來看另一個示例 −
using System;
public class Demo {
public static void Main(){
int utf = 0x0046;
string str = Char.ConvertFromUtf32(utf);
Console.WriteLine("Value = "+str);
}
}輸出
這將生成以下輸出 −
Value = F
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP