首先对Miscrosoft.VisualBasic类的引用.

using Microsoft.VisualBasic;

public static string Traditional2Simplified(string str)
        { //繁体转简体
            return (Microsoft.VisualBasic.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 on 2007-12-30 22:37  !@SJ$s  阅读(2363)  评论(3编辑  收藏  举报