在C#中使用OrderByDescending可以对集合中的元素进行降序排序。以下是一些小技巧来使用OrderByDescending:
var sortedList = myList.OrderByDescending(x => x.PropertyName).ToList();
var sortedList = (from item in myList
orderby item.PropertyName descending
select item).ToList();
var sortedList = myList.OrderByDescending(x => x.Property1).ThenByDescending(x => x.Property2).ToList();
var sortedList = myList.OrderByDescending(x => x, new CustomComparer()).ToList();