Variable names are something you will use a lot, so it's worth spending a bit of time learning the sort of names you should use. Developers have realized that it is far better to name variables appropriately for their purpose.
Currently, two naming conventions are used in the .NET Framework namespaces: PascalCase and camelCase. The case used in the names indicated their usage. They both apply to names that comprise multiple words and they both specify that each word in a name should be in lowercase except for its first letter, which should be uppercase. For camelCase terms, there is an additional rule: The first world should start with a lowercase letter.
The following are camelCase variable names:
age
firstName
timeOfDeath
These are PascalCase:
Age
FirstName
TimeOfDeath
For your simple variables, stick to camelCase. Use PacalCase fo certain more advanced naming, which is the Microsoft recommendation. Finally, note that many past name systems involved frequent use of of the underscore character, usually as a separator between words in variable names, such as yet_another_variable. This usage is now discouraged(which is just as well; it looks ugly!).
By convention, namespaces are usally written in PascalCase.
Currently, two naming conventions are used in the .NET Framework namespaces: PascalCase and camelCase. The case used in the names indicated their usage. They both apply to names that comprise multiple words and they both specify that each word in a name should be in lowercase except for its first letter, which should be uppercase. For camelCase terms, there is an additional rule: The first world should start with a lowercase letter.
The following are camelCase variable names:
age
firstName
timeOfDeath
These are PascalCase:
Age
FirstName
TimeOfDeath
For your simple variables, stick to camelCase. Use PacalCase fo certain more advanced naming, which is the Microsoft recommendation. Finally, note that many past name systems involved frequent use of of the underscore character, usually as a separator between words in variable names, such as yet_another_variable. This usage is now discouraged(which is just as well; it looks ugly!).
By convention, namespaces are usally written in PascalCase.
Comments
Post a Comment