/// <summary>
/// 简体转换为繁体
/// </summary>
/// <param name="str">简体字</param>
/// <returns>繁体字</returns>
public static string GetTraditional(string str)
{
if (string.IsNullOrEmpty(str))
return string.Empty;
string newStr = Microsoft.VisualBasic.Strings.StrConv(str, Microsoft.VisualBasic.VbStrConv.TraditionalChinese, 1033);
return newStr;
}
/// <summary>
/// 繁体转换为简体
/// </summary>
/// <param name="str">繁体字</param>
/// <returns>简体字</returns>
public static string GetSimplified(string str)
{
if (string.IsNullOrEmpty(str))
return string.Empty;
string newStr = Microsoft.VisualBasic.Strings.StrConv(str, Microsoft.VisualBasic.VbStrConv.SimplifiedChinese, 1033);
return newStr;
}
标签:简繁,return,string,newStr,str,互转,Net,Microsoft,VisualBasic From: https://www.cnblogs.com/pipitnt/p/16707489.html