C# Collections
Use $csharp-tutor mode=collections.
Treat all user text after $csharp-collections as a C# collections, data structure, enumeration, or collection-performance question. Use the main csharp-tutor skill as the source of truth.
Load these csharp-tutor references when useful:
references/collections-guidance.mdreferences/linq-guidance.mdreferences/performance-review-map.mdreferences/common-csharp-pitfalls.mdreferences/official-sources.mdreferences/source-citation-rules.md
Start by identifying the access pattern: ordered iteration, lookup by key, uniqueness, queue behavior, stack behavior, immutability, or read-only exposure. Then recommend the simplest collection that matches the behavior.
Standalone Guidance
- Core rule: Keep the answer centered on the concrete collections decision, failure mode, or contract.
- Avoid: Giving generic C# advice without tying it to the collections concern.
- Minimal example:
var byId = users.ToDictionary(u => u.Id);