.NET ez 2012-06-20
C# 如果要製作,簡體繁體轉換,只需要參考 Microsoft.VisualBasic 即可方便製作簡繁轉換。
程式碼如下:
using Microsoft.VisualBasic;
//將繁體中文字轉換成簡體中文
string str = Strings.StrConv("繁體轉簡體測試", VbStrConv.SimplifiedChinese, 2052);
//簡體中文 (GB2312) 系統的 LocaleID (LCID) 為 2052
Console.WriteLine(str);
//將簡體中文字轉換成繁體中文
str = Strings.StrConv(str, VbStrConv.TraditionalChinese, 1028);
//繁體中文 (Big5) 系統的 LocaleID (LCID) 為 1028
Console.WriteLine(str);標籤: .NET
本文章網址:
https://www.ez2o.com/Blog/Post/csharp-Big5-GB2312-TraditionalChinese-SimplifiedChinese
https://www.ez2o.com/Blog/Post/219
https://www.ez2o.com/Blog/Post/csharp-Big5-GB2312-TraditionalChinese-SimplifiedChinese
https://www.ez2o.com/Blog/Post/219
