拼音首字母排序

写在model里,实体类里。

public string FirstName
{
get
{
return string.IsNullOrEmpty(this.Name) ? "" : Net.Sourceforge.Pinyin4j.PinyinHelper.ToHanyuPinyinString(this.Name, new Net.Sourceforge.Pinyin4j.Format.HanyuPinyinOutputFormat(), " ").ToCharArray()[0].ToString().ToUpper();
}
}

posted @ 2016-02-29 10:39  MaoSan-Jerry  阅读(258)  评论(0编辑  收藏  举报