锐单电子商城 , 一站式电子元器件采购平台!
  • 电话:400-990-0325

C#(一) Linq表达式

时间:2022-11-03 11:00:00 yl1雨量传感器

筛选分数大于80,升序排列

  List scores = new List { 5, 200, 0, 66, 4, 32, 700, 1 };         IEnumerable 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

锐单商城拥有海量元器件数据手册IC替代型号,打造电子元器件IC百科大全!

相关文章