c# List 按类的指定字段排序

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-2 16:03   1354   0
1 List<Report> list=Report.FindAllbyClassID(id); 
2 
3 if (list !=null && list.Count>0)
4 
5 {
6 
7      list.Sort(delegate(Report x,Report y){return x.Sort-y.Sort;})
8 
9 }

转载于:https://www.cnblogs.com/netblaze/p/3280860.html

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP