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 }