Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
mylist.OrderBy(p => p.Description);
可能上升 - 那么下降呢?
只需使用OrderByDescending/ThenByDescending
OrderByDescending
ThenByDescending
为什么要在可用时创建扩展方法!
mylist.OrderByDescending(p => p.Description);
您正在使用的内容将按升序排列。要按降序排列,请使用OrderByDescending.