Follow in Twitter & Facebook


Like in Facebook

Powered By Blogger Widgets

Free Download

FREE Tools



Sunday, December 23, 2012

Naming Conventions for variables and methods.










Remember while writing programs,Microsoft suggests using Camel Notation (first letter in lowercase) for variables and Pascal Notation (first letter in uppercase) for methods.

Each word after the first word in the name of both variables and methods should start with a capital letter. For examples variable names following Camel notation could be:


sal      totalSal

myHrmMarks isValid


Some typical names of method following Pascal Notation are

GetTotalMarks()  End() Start()

WriteLine        ReadLine() LastIndexOf()


Although it is mandatory to follow this convention, it is highly recommended that you strictly follow the convention.

Microsoft no longer supports Hungarian notation, like using iMarks for integer variable.Also, using the underscore_in identifiers is not encouraged.




0 on: "Naming Conventions for variables and methods."