Types Capitalization - C# Coding Standard 13

In this article we discuss how to capitalize different C# types. There are three different capitalization methods we have. Those are Pascal Casing, Camel Casing, and Upper-Case Casing.

 

Pascal Case Casing: First letter should be in upper case and first letter of each subsequent word also should be in upper case, all other letters are in lower case.

For Class & Struct, Events, Exception class, Enum & Enum values, Namespace, Interface, Methods, Read-Only fields, and property, we use Pascal Casing in C#.

Eg: EmployeeInfo, ForeColor

Camel Case Casing: First letter should be in lower case and first letter of each concatenated word should be in upper case.

In C#, for parameters we use camel casing.

Eg: isValid, lastName

Upper Case Casing: All letter should be in upper case. Eg: EMPLOYEEDATA, DATABASENAME

In C#, we use only Pascal Case Casing and Camel Case Casing only for most of the types.