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 9.1 – test your knowledge
Answer the following questions:
- What are the two requirements to use 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?
Exercise 9.2 – practice querying with LINQ
Create a console application named Ch09_Exercise02 that prompts the user for a city and then lists the company names for Northwind ...
Get C# 6 and .NET Core 1.0: Modern Cross-Platform Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.