8,497
社区成员
发帖
与我相关
我的任务
分享
var fileNetUrl = this.ResolveUrl("~/app_data/Test_090724_WebUserControl.txt");
var filePhysicalUrl = Server.MapPath(fileNetUrl);
var chars = File.ReadAllLines(filePhysicalUrl).AsParallel().SelectMany(n => n.ToCharArray());
var res = from c in chars group c by c into gc select new { charactor = gc.Key, count = gc.Count() };
res = res.OrderBy(c => c.charactor);
this.GridView1.DataSource = res;
this.GridView1.DataBind();