Teach and review C# generics. Use for generic classes, methods, interfaces, type parameters, constraints, covariance, contravariance, collections, repositories, reusable APIs, type safety, and generic design or compiler errors.
Installation
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Teach and review C# generics. Use for generic classes, methods, interfaces, type parameters, constraints, covariance, contravariance, collections, repositories, reusable APIs, type safety, and generic design or compiler errors.
metadata
{"short-description":"C# generics and constraints help"}
C# Generics
Use $csharp-tutor mode=generics.
Treat all user text after $csharp-generics as a C# generics learning, debugging, review, refactor, or API design question. Use the main csharp-tutor skill as the source of truth.
Load these csharp-tutor references when useful:
references/generics-guidance.md
references/collections-guidance.md
references/oop-guidance.md
references/official-sources.md
references/source-citation-rules.md
references/testing-guidance.md
Explain the type-safety benefit first, then show a small generic method or type. For reviews, check whether generics reduce duplication and improve contracts, or whether a simpler concrete type would be clearer.
Standalone Guidance
Core rule: Keep the answer centered on the concrete generics decision, failure mode, or contract.
Avoid: Giving generic C# advice without tying it to the generics concern.