C# Lambda表达式与Linq
int[] arry = { 1, 3, 565, 76, 4, 32, 2 }; //linq写法 var res = from i in arry select i; //lambda写法 var res = arry.Select(i => i);
//Linq var res = from s in arry where s%2 == 0 select s; //Lambda var res = arry.Where(s => s % 2 == 0);
文章对您有帮助,开心可以打赏我,金额随意,欢迎来赏!
需要电子方面开发板/传感器/模块等硬件可以到我的淘宝店逛逛