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:

  1. What are the two requirements to use LINQ?
  2. Which LINQ extension method would you use to return a subset of properties from a type?
  3. Which LINQ extension method would you use to filter a sequence?
  4. List five LINQ extension methods that perform aggregation.
  5. What is the difference between the Select and SelectMany 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.