C#取汉字首字母,汉字全拼

使用类库为

https://gitee.com/kuiyu/dotnetcodes/tree/master/DotNet.Utilities/%E6%B1%89%E5%AD%97%E8%BD%AC%E6%8B%BC%E9%9F%B3

取首字母

 textBox2.Text = PinYin.GetCodstring(textBox1.Text);

取汉字全拼

EcanConvertToCh toCh = new EcanConvertToCh();
textBox3.Text = toCh.convertCh(textBox1.Text);

效果

原文地址:https://www.cnblogs.com/liessay/p/12736638.html