LIST 排序

List<int> tmp = new List<int>(){5,1,22,11,4};
tmp.Sort((x, y) => -x.CompareTo(y));
Console.WriteLine(tmp);
//22,11,5,4,1

 

posted on 2016-08-20 18:21  HOT SUMMER  阅读(228)  评论(0编辑  收藏  举报

导航