Instruction file imported from foluis/Fifa-2026-flags-Getter (
.github/instructions/csharp.instructions.md). Copyright stays with the author.
- Prefer straightforward code, avoid over-engineering.
- Use async/await for I/O.
- Add basic argument validation for public methods.
- Keep logic testable, avoid mixing UI concerns into services.
- Favor composition over inheritance.
- Use expression-bodied members for simple properties and methods.
- Prefer
varfor local variable declarations when the type is obvious. - Use string interpolation (
$"...") instead ofString.Format. - Use
usingstatements for resource management. - Follow .NET naming conventions: PascalCase for types and methods, camelCase for parameters and private fields.
- Write XML documentation comments for public APIs.
- Use LINQ for collections manipulation when appropriate.
- Avoid empty catch blocks; at least log the exception.