What problem does it solve?
Modern C# feature guidance prevents .NET developers from writing outdated patterns and missing safer, more efficient language constructs, keeping codebases consistent and easier to maintain.
Core Features & Use Cases
- Modern language-first implementations: Prefer C# 14 features like primary constructors, collection expressions, records, pattern matching, raw string literals, and extension members to reduce boilerplate and improve clarity.
- Performance-minded constructs: Use value-oriented types such as record structs and leverage Span<T> for low-allocation slicing when handling text and parsing.
- Correctness and safer state: Apply required members and immutability patterns, and use the field keyword to enforce validation and lazy initialization without manual backing fields.
Use Case Example: When reviewing a service class that uses constructor boilerplate and mutable DTOs, apply primary constructors, convert DTOs to records, use required/init where appropriate, and replace verbose parsing and string handling with Span<T> and raw string literals for clearer, safer C# 14 code.
Quick Start
Load this skill and modernize the following C# codebase to C# 14 using primary constructors, records/value types, pattern matching, raw string literals, and field keyword validation where it improves correctness.