int[] arrInt; arrInt = new int[]{1,2,3,45,6,8,9}; var r1 = arrInt.All(m => m > 10);// 所有元素都满足条件,false var r2 = arrInt.Any(m => m > 10);// 有任一元素满足条件,true int[] numbers1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; var query1 = numbers1.Aggregate((a, b) => a * b); // 聚合函数,返回结果做参数,等于((((((((1*2)*3)*4)*5)*6)*7)*8)*9) var list = Enumerable.Range(1, 100); var result = list.Aggregate((a, b) => (a + b)); // 返回1+...+100的和 var nums = Enumerable.Range(2, 4); var sum = nums.Aggregate(1,(a, b) => a * b);// 2=>5的阶乘