swe-programming-csharplisted
Install: claude install-skill wahidyankf/ose-primer
# C# Coding Standards
## Purpose
Progressive disclosure of C# coding standards for agents writing C# code.
**Usage**: Auto-loaded for agents when writing C# code. Provides quick reference to idioms, best practices, and antipatterns.
**Authoritative Source**: [docs/explanation/software-engineering/programming-languages/c-sharp/README.md](../../../docs/explanation/software-engineering/programming-languages/c-sharp/README.md)
## Prerequisite Knowledge
**IMPORTANT**: This skill provides **demo-specific style guides**, not educational tutorials.
Complete the demo C# learning path first:
## Quick Standards Reference
### Naming Conventions
**Classes/Interfaces/Methods/Properties**: PascalCase
- `ZakatCalculator`, `IZakatRepository`, `CalculateAmount()`, `TotalWealth`
**Local Variables/Parameters**: camelCase
- `zakatAmount`, `nisabThreshold`, `paymentDate`
**Private Fields**: `_camelCase` prefix
- `private readonly IZakatRepository _repository;`
**Constants**: PascalCase
- `public const decimal ZakatRate = 0.025m;`
### Nullable Reference Types
```csharp
// CORRECT: Enable nullable in .csproj
// <Nullable>enable</Nullable>
// CORRECT: Non-nullable by default
public string ContractId { get; init; } = string.Empty;
// CORRECT: Nullable when intentional
public string? Notes { get; init; }
// CORRECT: Null-forgiving with justification
var value = GetValue()!; // Safe because we validated above
```
### Records for Value Objects
```csharp
// CORRECT: Record for immu