using Microsoft.VisualBasic;
添加 Microsoft.VisualBasic引用
/// <summary>
/// 转换为简体中文
/// </summary>
public static string ToSChinese(string str)
{
return Strings.StrConv(str, VbStrConv.SimplifiedChinese, 0);
}
/// <summary>
/// 转换为繁体中文
/// </summary>
public static string ToTChinese(string str)
{
return Strings.StrConv(str, VbStrConv.TraditionalChinese, 0);
}
转自:http://hi.baidu.com/zzticzh/blog/item/f6ddfd243e3659378644f97d.html