Jump to content

PascalCase: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
prose over bulleds and copy edit
linking and correcting nomenclature, WP:NOTBROKEN notwithstanding
Line 6: Line 6:
In programming, '''PascalCase''' is 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><ref name=":1">{{Cite web|url=https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/capitalization-conventions|title=Capitalization Conventions|website=docs.microsoft.com|access-date=2017-07-31}}</ref> such as BackColor, TimeUtc, FirstName, HtmlSize<ref name=":1" />, IntervalId<ref name=":1" /> and ComputerRamSize. No other characters are used to separate the words, like hyphens or underscores.
In programming, '''PascalCase''' is 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><ref name=":1">{{Cite web|url=https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/capitalization-conventions|title=Capitalization Conventions|website=docs.microsoft.com|access-date=2017-07-31}}</ref> such as BackColor, TimeUtc, FirstName, HtmlSize<ref name=":1" />, IntervalId<ref name=":1" /> and ComputerRamSize. No other characters are used to separate the words, like hyphens or underscores.


This is different from [[camelCase]], in which the first letter may be lowercase or capitalized and each subsequent concatenated word is capitalized<ref name=":0" /> such as such as backColor and timeUtc, or [[snake case]] in which the words are always combined with an underscore character (_), such as back_color, time_utc, first_name or computer_ram_size.
This is different from [[camel case]], in which the first letter may be lowercase or capitalized and each subsequent concatenated word is capitalized<ref name=":0" /> such as such as backColor and timeUtc, or [[snake case]] in which the words are always combined with an underscore character (_), such as back_color, time_utc, first_name or computer_ram_size.


Microsoft adheres to PascalCase and camelCase usage for variables of three or more letters.<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.
Microsoft adheres to PascalCase and camelCase usage for variables of three or more letters.<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.

Revision as of 19:36, 24 October 2017

In programming, PascalCase is the practice of writing compound words or phrases such that the first letter of each concatenated word is capitalized[1][2] such as BackColor, TimeUtc, FirstName, HtmlSize[2], IntervalId[2] and ComputerRamSize. No other characters are used to separate the words, like hyphens or underscores.

This is different from camel case, in which the first letter may be lowercase or capitalized and each subsequent concatenated word is capitalized[1] such as such as backColor and timeUtc, or snake case in which the words are always combined with an underscore character (_), such as back_color, time_utc, first_name or computer_ram_size.

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.

References

  1. ^ a b c "Capitalization Styles". msdn.microsoft.com. Retrieved 2016-04-27.
  2. ^ a b c "Capitalization Conventions". docs.microsoft.com. Retrieved 2017-07-31.