38.
string[] colors = { "green", "brown", "blue", "red" }; var query = from c in colors where c.Length > 3 orderby c.Length select c;
What type is query?
View Description
The compiler translates this query to:
IEnumerable<string> query = colors.Where (c => c.Length > 3).OrderBy (c => c.Length);
The Where and OrderBy methods, in this case, resolve to Enumerable.Where and Enumerable.OrderBy, which both return IEnumerable<T>. T is inferred to be string because we haven't transformed or projected the input sequence elements in any way.