C#实现简体中文和繁体中文的转换

C#实现简体中文和繁体中文的转换





添加 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);
        }

源码下载

posted on 2007-12-27 21:54  无意  阅读(1853)  评论(1编辑  收藏  举报

导航