1 ///2 /// 字符串简体转繁体 3 /// 4 /// 5 ///6 public static string ToTraditionalChinese(string strSimple) 7 { 8 string strTraditional = Microsoft.VisualBasic.Strings.StrConv(strSimple, Microsoft.VisualBasic.VbStrConv.TraditionalChinese, 0); 9 return strTraditional;10 }11 12 /// 13 /// 字符串繁体转简体14 /// 15 /// 16 ///17 public static string ToSimplifiedChinese(string strTraditional)18 {19 string strSimple = Microsoft.VisualBasic.Strings.StrConv(strTraditional, VbStrConv.SimplifiedChinese, 0);20 return strSimple;21 }
找不到Microsoft.VisualBasic解决方法:
右击项目:点击[添加引用]。把这个 Microsoft.VisualBasic...引用到项目