C# Naming Conventions: Microsoft's Official Guidelines
5 min read
C# has well-documented naming conventions from Microsoft, followed across the .NET ecosystem.
Convention Table
| Item | Convention | Example |
|---|---|---|
| Classes/Structs | PascalCase | UserAccount |
| Interfaces | I + PascalCase | IDisposable |
| Methods | PascalCase | GetUserById() |
| Properties | PascalCase | FirstName |
| Events | PascalCase | OnClick |
| Local variables | camelCase | userName |
| Parameters | camelCase | userId |
| Constants | PascalCase | MaxRetryCount |
| Private fields | _camelCase | _connectionString |
Note: C# uses PascalCase for constants, not SCREAMING_SNAKE — unlike most other languages.