c# 取 list前100条数据

【问】

List<KeyWord> sortedList = (from a in keyWordList orderby a.Total descending select a).ToList();

这是将keyWordList 按照 Total 降序排列,我现在想用一种方法取它的降序排列的前100个,能用一条语句实现吗

【答】
(from a in keyWordList orderby a.Total descending select a).Take(30).ToList();
原文地址:https://www.cnblogs.com/lj821022/p/4836554.html