将简体中文转换为繁体中文,首先需要引入ChineseConvert.dll程序集
代码如下:
1 using System; 2 3 using System.Collections.Generic; 4 5 using System.ComponentModel; 6 7 using System.Data; 8 9 using System.Drawing; 10 11 using System.Linq; 12 13 using System.Text; 14 15 using System.Windows.Forms; 16 17 using Microsoft.International.Converters.TraditionalChineseToSimplifiedConverter; 18 19 20 21 namespace 简体中文转换为繁体中文 22 23 { 24 25 public partial class Form1 : Form 26 27 { 28 29 public Form1() 30 31 { 32 33 InitializeComponent(); 34 35 } 36 37 38 39 private void button1_Click(object sender, EventArgs e) 40 41 { 42 43 string str = textBox1.Text; 44 45 textBox2.Text=ChineseConverter.Convert(str,ChineseConversionDirection.SimplifiedToTraditioa; 46 47 } 48 49 } 50 51 }