使用类库为
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);
效果