PascalCase: Difference between revisions
No edit summary |
Ninjakannon (talk | contribs) m Corrected grammar |
||
Line 24: | Line 24: | ||
''"camelCase" isn't necessarily PascalCase, but "PascalCase" is.'' |
''"camelCase" isn't necessarily PascalCase, but "PascalCase" is.'' |
||
PascalCase and camelCase may be compared to [[ |
PascalCase and camelCase may be compared to [[snake_case]] in which the words are always combined with an underscore character (_). |
||
For example: |
For example: |
Revision as of 10:55, 8 July 2017
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
|
In programming, PascalCase is the practice of writing compound words or phrases such that the first letter of each concatenated word is capitalized.[1] No other characters are used to separate the words, like hyphens or underscores.
For example:
- BackColor
- TimeUTC
- FirstName
- ComputerRAMSize
This is different from camelCase in which the first letter can be lowercase or capitalized and each subsequent concatenated word is capitalized.[1]
For example:
- backColor
- timeUtc
- firstName
- computerRamSize
"camelCase" isn't necessarily PascalCase, but "PascalCase" is.
PascalCase and camelCase may be compared to snake_case in which the words are always combined with an underscore character (_).
For example:
- back_color
- time_utc
- first_name
- computer_ram_size
Recent Usage
Microsoft adheres to PascalCase and camelCase usage for variables of three or more letters.[1] Common contemporary usage classes PascalCase as a special type of CamelCase, namely upper camel case, whilst camelCase as defined above is termed lower camel case. For further details, including history, see main article Camel case.
References
- ^ a b c "Capitalization Styles". msdn.microsoft.com. Retrieved 2016-04-27.