繁简字转换(C#)
1、首先引入:
using Microsoft.VisualBasic;
2、转换方法:
//繁体转简体
public static string Traditional2Simplified(string str)
{
return (Strings.StrConv(str, Microsoft.VisualBasic.VbStrConv.SimplifiedChinese, 0));
}
//简体转繁体
public static string Simplified2Traditional(string str)
{
return (Microsoft.VisualBasic.Strings.StrConv(str as String, Microsoft.VisualBasic.VbStrConv.TraditionalChinese, 0));
}