Jump to content

PascalCase: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m sp
redirect since the content is merged
Tag: New redirect
 
(22 intermediate revisions by 11 users not shown)
Line 1: Line 1:
#REDIRECT [[Camel case]]
{{Multiple issues|
{{Underlinked|date=September 2016}}
{{refimprove|date=August 2016}}
}}

In programming, '''PascalCase''' denotes the practice of writing compound words or phrases such that the first letter of each concatenated word is capitalized.<ref name=":0">{{Cite web|url=https://msdn.microsoft.com/en-us/library/x2dbyw72(v=vs.71).aspx|title=Capitalization Styles|website=msdn.microsoft.com|access-date=2016-04-27}}</ref> 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.<ref name=":0" />

For example:

* backColor
* timeUtc
* firstName
* computerRamSize

''"camelCase" isn't PascalCase, but "PascalCase" is.''

and an other variant is [[Snake_case]] in which the words always lowercased and combined with an underscore character (_)

For example:

* back_color
* time_utc
* first_name
* computer_ram_size

==Recent Usage==
While Microsoft adheres to the above strict usage,<ref name=":0" /> 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==
{{Reflist}}

[[Category:Naming conventions]]
[[Category:Capitalization]]

Latest revision as of 03:42, 20 January 2018

Redirect to: