(一)将汉字转化成全拼
代码:
private void button1_Click(object sender, EventArgs e)
{
this.textBox2.Text = Hz2Py.Convert(this.textBox1.Text);
}
汉字转拼音类:
/// <summary>
/// 汉字转拼音类
/// </summary>
public class Hz2Py
{
private static int[] pyValue = new int[]
{
-20319,-20317,-20304,-20295,-20292,-20283,-20265,-20257,-20242,-20230,-20051,-20036,
-20032,-20026,-20002,-19990,-19986,-19982,-19976,-19805,-19784,-19775,-19774,-19763,