筛选分数大于80,升序排列
List<int> scores = new List<int> { 5, 200, 0, 66, 4, 32, 700, 1 }; IEnumerable<int> highScoresQuery = from score in scores where score > 80 orderby score ascending select score; //ascending 升序排列 //descending 降序排列
或直接筛选不排序
var result = scores.Where(c => c>80).ToList();
Join 参考https://mp.weixin.qq.com/s/Bf_cHt7Yl1yBudbQKOhdTg
let 参考https://mp.weixin.qq.com/s/AUwbq7gWGZa9K4W0SGhEfA