LINQ Methods You're Probably Not Using - (aka. Hidden Gems)
Watch the Video
Or watch it directly on YouTube: Click here
Video Description
Stop writing 10-line loops when one LINQ method will do! In this presentation, I cover the game-changing LINQ methods that shipped with .NET 6+ that most developers don't know about.
What You'll Learn:
- Chunk() - Process collections in batches without Skip/Take inefficiency
- DistinctBy() & UnionBy() - Finally, no more GroupBy workarounds!
- MinBy() & MaxBy() - Stop sorting entire collections for one item
- ExceptBy() & IntersectBy() - Set operations without intermediate collections
- TryGetNonEnumeratedCount() - Avoid accidental enumeration
- Zip() - Combine parallel collections elegantly
Performance Shallow Dive: I start with a refresher on Big O notation (perfect if you have a music degree like me!) explaining why O(n) vs O(n²) matters in real code. Then we dive into practical examples showing how these methods can make your code both cleaner AND faster.
Real-World Examples:
- Batch processing for API rate limits
- Finding inactive customers
- Combining data from multiple sources
- Processing large datasets efficiently
Perfect for intermediate to advanced C# developers who want to level up their LINQ game. All methods shown require .NET 6 or later.
Resources: Blog post and Code Samples: https://www.benday.com/blog/linq-methods-not-using-but-should-be
#dotnet #csharp #linq #programming #softwaredevelopment #cleancode #performance
Video Info
- Duration: 11:00
- Published: September 26, 2025