好记性不如烂笔头。

使用Linq和Lambda对List<T>进行排序

List<ShopMessageShow> ms = bll.GetMsgs();
Linq:
//按时间降序(升序则把descending去掉)
List<ShopMessageShow> msgChilds = (from m in ms orderby m.ModifyTime descending select m).ToList<ShopMessageShow>();
Lambda:
//按时间降序(升序则把 OrderByDescending 改成 OrderBy) 
单字段:List<ShopMessageShow> msgChilds = ms.OrderByDescending(m=> m.orderid).ToList<ShopMessageShow>();
多字段:List<ShopMessageShow> msgChilds = ms.OrderByDescending(m=> new{m.orderid,m.Id}).ToList<ShopMessageShow>();