c# List 按类的指定字段排序
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 }
- 上一篇 »java8 stream多字段排序
- 下一篇 »PHP二位数组按照数组的某个字段值排序
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 }