Naming Conventions for variables and methods.

Sunday, December 23, 20120 comments

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.

Share this article :

Post a Comment

Copyright © 2010. SharePointDotNet.com - All Rights Reserved
Template Created by Creating Website Published by Mas Template