What problem does it solve?
This skill reduces subtle bugs and performance pitfalls in LINQ to Objects by clarifying deferred execution, materialization timing, operator semantics, and readability conventions so developers avoid repeated enumeration and unintended side effects.
Core Features & Use Cases
- Materialization guidance: When to call ToList or ToArray versus preserving deferred execution for single-pass scenarios.
- Operator selection: When to use Select, SelectMany, Any, Count, First/Single variants, and how to avoid misuse.
- Performance and readability: Recommendations for GroupBy, ToLookup, stable multi-key ordering with ThenBy, avoiding Aggregate for string building, and formatting chained calls for clarity.
- Code review checklist: Practical rules for reviewing in-memory LINQ queries to prevent memory pressure, repeated evaluation, and hidden side effects.
Quick Start
Ask the csharp-linq skill to review a LINQ to Objects query and recommend materialization, operator changes, and formatting to improve performance and correctness.