0% found this document useful (0 votes)
45 views

Coding Guidelines: Pascalcasing Camelcasing Var

Coding guidelines create consistent code to help readers focus on content rather than layout, quickly understand code based on experience, and easily copy, change, and maintain code. The guidelines specify using PascalCasing for class and method names, camelCasing for arguments and local variables, implicit typing for obvious variable types, declaring member variables at the top of classes with static variables first, and writing short methods instead of long ones.

Uploaded by

vishal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Coding Guidelines: Pascalcasing Camelcasing Var

Coding guidelines create consistent code to help readers focus on content rather than layout, quickly understand code based on experience, and easily copy, change, and maintain code. The guidelines specify using PascalCasing for class and method names, camelCasing for arguments and local variables, implicit typing for obvious variable types, declaring member variables at the top of classes with static variables first, and writing short methods instead of long ones.

Uploaded by

vishal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Coding Guidelines

Coding conventions serve the following purposes:

 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.

You might also like