Pascal case is a subset of Camel Case where the first letter is capitalized.
That is,
userAccount
is a camel case and UserAccount
is a Pascal case.
The conventions of using these are different. You use camel case for variables and Pascal case for Class names or Constructors.
It is easy to remember. Pascal is a proper noun so capitalize the first letter.
camel is a common noun, so you do not capitalize the first letter.
camel is a common noun, so you do not capitalize the first letter.
Talking from a programmer's perspective, PascalCase means the first char should be capitalized while camelCase means the first char should be lowercased.
In general both can be considered equivalent although by definition "CamelCase" is a valid camel-cased word. Hence, PascalCase can be considered to be a subset of camelCase.
To remember camel case you have to think about the shape of the capital letters. They are like the humps of a camel as you can see this image.
Pascal Casing - capitalizes each word:
ThisShouldBePascalCase
Camel Casing - is similiar to pascal case but the first word is not capitalized:
thisShouldBeCamelCase
Comments
Post a Comment