Query and transform collections with C# LINQ

8 steps · about 2 h · Beginner

  1. Walk through writing LINQ queries (article, Microsoft Learn, 15 min)

    Orients you before the operator details.

  2. Write your first queries (article, Microsoft Learn, 20 min)

    Hands-on filtering and ordering.

  3. Browse the standard query operators (article, Microsoft Learn, 20 min)

    Maps tasks like Select and Where to the operator you need.

  4. Take, skip and page results (article, Microsoft Learn, 15 min)

    Shows Take, Skip and Chunk for paging.

  5. Combine sets of values (article, Microsoft Learn, 15 min)

    Covers Distinct, Union, Intersect and Except.

  6. Convert results to lists and dictionaries (article, Microsoft Learn, 10 min)

    Covers ToList, ToDictionary and AsEnumerable.

  7. Test with Any and All (article, Microsoft Learn, 10 min)

    Answers yes/no questions about a sequence.

  8. See deferred execution at work (article, Microsoft Learn, 15 min)

    Explains why queries run when enumerated, a classic LINQ trap.