C# 實現list=list.OrderBy(q=>q.欄位名).ToList(); 按多個欄位排序

qq_23944441發表於2018-05-07

//倒序

list.OrderByDescending(i => i.a).ThenByDescending(i => i.b);

//順序

list.OrderBy(i => i.a).ThenBy(i => i.b);

相關文章