C#, 计算字符串里有多少个指定字符

1 int number = a.Count<char>(c => c == '@');

 

posted @ 2018-07-31 09:56  dyfisgod  阅读(1020)  评论(0编辑  收藏  举报