繁简字转换(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));
}

posted @ 2017-11-20 11:15  向萧  阅读(267)  评论(0编辑  收藏  举报