Practicing and exploring
Test your knowledge and understanding by answering some questions, getting some hands-on practice, and exploring with deeper research into the topics covered in this chapter.
Exercise 11.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
SelectandSelectManyextension methods? - What is the difference between
IEnumerable<T>andIQueryable<T>? How do you switch between them? - What does the last type parameter
Tin genericFuncdelegates likeFunc<T1, T2, T>represent? - What is the benefit of a LINQ extension method that ends with
OrDefault? - Why is query comprehension syntax optional...