汉字转换成拼音开发包

汉字转换成拼音实现自动检索:Visual Studio International Pack

案例:

StringBuilder sbPy = new StringBuilder();

String txt = "你好";

foreach(char ch in txt)

{

  ChineseChar chChar = new ChineseChar(ch);

  if(chChar.Pinyins.Count > 0)

  {

    sbPy.Append(chChar.Pinyins[0].Substring(0,chChar.Pinyins[0].Length));

  }

}

//输入sbPy即可

posted @ 2013-08-19 21:53  无处安放的青春  阅读(283)  评论(0编辑  收藏  举报