Coding Guidelines: Pascalcasing Camelcasing Var
Coding Guidelines: Pascalcasing Camelcasing Var
They create a consistent look to the code, so that readers can focus on content,
not layout.
They enable readers to understand the code more quickly by making
assumptions based on previous experience.
They facilitate copying, changing, and maintaining the code.
1. Use PascalCasing for class names and method names. For eq. ClientActivity.
2. Use camelCasing for method arguments and local variables. For eq. itemCount.
3. Use implicit type var for local variable declarations when the type of the variable is
obvious from the right side of the assignment, or when the precise type is not important.
4. Do not use var when the type is not apparent from the right side of the assignment.
5. Declare all member variables at the top of a class, with static variables at the very top.
6. Don’t use Hungarian notation or any other type identification in identifiers like strName,
iCounter.
7. Don’t use Underscores in identifiers like client_Appointment.
8. Try to make small methods instead of creating single long method. Ideally, a method
shouldn’t contain more than 7-8 lines.
9.