Practicing and exploring
Test your knowledge and understanding by answering some questions, get some hands-on practice, and explore with deeper research into the topics covered in this chapter.
Exercise 12.1 – Test your knowledge
Answer the following questions:
- What are the two required parts of LINQ?
- Which LINQ extension method would you use to return a subset of properties from a type?
- Which LINQ extension method would you use to filter a sequence?
- List five LINQ extension methods that perform aggregation.
- What is the difference between the
Select
andSelectMany
extension methods? - What is the difference between
IEnumerable<T>
andIQueryable<T>
? And how do you switch between them? - What does the last type parameter in the generic
Func
delegates represent? - What is the benefit of a LINQ extension method that ends with
OrDefault
? - Why is query comprehension syntax optional?
- How can you create your...