159.
string[] colors = { "green", "brown", "blue", "red" };
What's the output from the following?
var query =
from c in colors
where c.Length == colors.Max (c => c.Length)
select c;
foreach (var element in query)
Console.WriteLine (element);
View Description
The variable, c, inside the subquery, conflicts with the outer query's iteration variable, so the compiler complains. Here's how to fix it:
var query =
from c in colors
where c.Length == colors.Max (c2 => c2.Length)
select c;
The answer is then (green followed by brown).