以下代码等效的 lambda 表达式是什么
int[] numbers = { 3, 4, 5, 6, 7, 8 };
int count = numbers.Count(x => x > 5 == true);
我试过这个,但它没有编译:
var c = from number in numbers where number > 5 select numbers.Count;
这个也没有编译:
var c = from number in numbers where number > 5 select new {numbers.Count};