标签:
1:sort
List<int> nList= new List<int>();
new List<string>(sortStrings).ForEach(e => { nList.Add(int.Parse(e)); });
Item.Sort( (a, b) => { return nList.FindIndex(s => s == a.AttributeId) - nList.FindIndex(s => s == b.AttributeId); });
2:orderby ,OrderByDescending
return list.OrderByDescending(p => { if (true) { return -1; } return 0; }).ToList();
标签:
原文地址:http://www.cnblogs.com/sheseido/p/4667958.html