C# Variable Naming Capitalization Styles Refresher from MSDN
EditThe following table summarizes the capitalization rules and provides examples for the different types of identifiers.
| Identifier | Case | Example |
|---|---|---|
| Class | Pascal | AppDomain |
| Enum type | Pascal | ErrorLevel |
| Enum values | Pascal | FatalError |
| Event | Pascal | ValueChange |
| Exception class | Pascal | WebExceptionNote Always ends with the suffix Exception. |
| Read-only Static field | Pascal | RedValue |
| Interface | Pascal | IDisposable
Note Always begins with the prefix
|
| Method | Pascal | ToString |
| Namespace | Pascal | System.Drawing |
| Parameter | Camel | typeName |
| Property | Pascal | BackColor |
| Protected instance field | Camel | redValueNote Rarely used. A property is preferable to using a protected instance field. |
| Public instance field | Pascal | RedValueNote Rarely used. A property is preferable to using a public instance field. |
C# Variable Naming Capitalization Styles Refresher from MSDN
Reviewed by DF
on
8:10:00 PM
Rating: