For any developer, Naming Conventions is a best practice when working on any development project. Let’s discuss more about Naming Conventions in this article.
Why Naming Conventions?
Naming Conventions are very important to identify the usage and purpose of a class or a method and to identify the type of variable and arguments.
Types of Naming Conventions
Below are the two major parts of Naming Conventions.
- Pascal Casing (PascalCasing)
- Camel Casing (camelCasing)
Pascal Casing (PascalCasing)
Use PascalCasing for class names, method/function names, and constants or read-only variables.
- //Use PascalCasing for Class Names
- public class Products {
- //Use PascalCasing for Constant Variable or Read only Variables
- public
- const string ProductType = "General";
- //Use PascalCasing for Method Names
- public void GetProductDetails() {
- //Your logic here...
- }
- }
Camel Casing (camelCasing)
Use camelCasing for variable names and method arguments.
- public class Products {
- public
- const string ProductType = "General";
- //Use camelCasing for Method Arguments
- public void GetProduct(int productCategory) {
- //Use camelCasing for Variables Name
- int productCount;
- //Your logic here...
- }
- }

Sunghoon OhPosted Aug 24, 2018, 8:59 PM
It's simple, but good. Thanks.