在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1 /// <summary> 2 /// 字符串简体转繁体 3 /// </summary> 4 /// <param name="strSimple"></param> 5 /// <returns></returns> 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 /// <summary> 13 /// 字符串繁体转简体 14 /// </summary> 15 /// <param name="strTraditional"></param> 16 /// <returns></returns> 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解决方法: 1 /// <summary> 2 /// 字符串简体转繁体 3 /// </summary> 4 /// <param name="strSimple"></param> 5 /// <returns></returns> 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 /// <summary> 13 /// 字符串繁体转简体 14 /// </summary> 15 /// <param name="strTraditional"></param> 16 /// <returns></returns> 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解决方法: |
请发表评论