Complete the code to use LINQ to filter numbers greater than 10.
var result = numbers.Where(n => n [1] 10);
The 'Where' method filters elements. Using '>' selects numbers greater than 10.
Complete the code to convert the filtered result to a list for better performance.
var list = result.[1]();Using 'ToList()' materializes the query immediately, improving performance when enumerating multiple times.
Fix the error in the LINQ query to avoid multiple enumerations causing performance issues.
var count = [1].Count();
var first = numbers.First();Using 'numbers' directly avoids multiple enumerations of a query, which can be costly.
Fill both blanks to create a dictionary from a list with keys as IDs and values as names.
var dict = people.ToDictionary(p => p[1], p => p[2]);
'ToDictionary' needs a key selector and a value selector. Here, keys are IDs and values are Names.
Fill all three blanks to create a filtered and projected list of uppercase names for people older than 30.
var result = people.Where(p => p[1] > 30).Select(p => p[2].[3]()).ToList();
Filter by age > 30, select the Name property, then convert it to uppercase.