Which LINQ query-syntax expression selects numbers greater than 5 from an array nums?
Correct answer A. from n in nums where n > 5 select n
Explanation
C# query expressions start with a from clause naming a range variable and source, then optional clauses such as where and orderby, and must end with select or group. Unlike SQL, select comes last, which lets IntelliSense know the range variable's type. The compiler translates the query into method calls: nums.Where(n => n > 5).
Answer checked How we write and check questions
Discussion