//簡體轉繁體
public static string _ConvertChinTrad(string strInput)
{
? ? EncodeRobert edControl = new EncodeRobert();
? ? string strResult = "";
? ? if (strInput == null)
? ? ? ? return strResult;
? ? if (strInput.ToString().Length >= 1)
? ? ? ? strResult = edControl.SCTCConvert(ConvertType.Simplified, ConvertType.Traditional, strInput);
? ? else
? ? ? ? strResult = strInput;
? ? return new string(strResult);
}
//繁體轉簡體
public static string _ConvertChinSimp(string strInput)
{
? ? EncodeRobert edControl = new EncodeRobert();
? ? string strResult = "";
? ? if (strInput.Length >= 1)
? ? ? ? strResult = edControl.SCTCConvert(ConvertType.Traditional, ConvertType.Simplified, strInput);
? ? else
? ? ? ? strResult = strInput;
? ? return new string(strResult);
}
說明:要引用Encode.dll