C#简繁体转换工具包
DLL文件下载:ChineseConverter.rar
1.添加引用 ChineseConverter.dll
2.引入命名空间
using Microsoft.International.Converters.TraditionalChineseToSimplifiedConverter;
3.简体转换为繁体
/// <summary>
/// 简体转换为繁体
/// </summary>
/// <param name="Text">转换文本</param>
/// <returns>繁体文本</returns>
public static string SimplifiedToTraditional(string Text)
{
return ChineseConverter.Convert(Text, ChineseConversionDirection.SimplifiedToTraditional);
}
/// 简体转换为繁体
/// </summary>
/// <param name="Text">转换文本</param>
/// <returns>繁体文本</returns>
public static string SimplifiedToTraditional(string Text)
{
return ChineseConverter.Convert(Text, ChineseConversionDirection.SimplifiedToTraditional);
}
4.繁体转换为简体
/// <summary>
/// 繁体转换为简体
/// </summary>
/// <param name="Text">转换文本</param>
/// <returns>简体文本</returns>
public static string TraditionalToSimplified(string Text)
{
return ChineseConverter.Convert(Text, ChineseConversionDirection.TraditionalToSimplified);
}
/// 繁体转换为简体
/// </summary>
/// <param name="Text">转换文本</param>
/// <returns>简体文本</returns>
public static string TraditionalToSimplified(string Text)
{
return ChineseConverter.Convert(Text, ChineseConversionDirection.TraditionalToSimplified);
}