. NET Framework General Reference-capitalization Styles
Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
Use the following three conventions for capitalizing identifiers.
The "identifier" and "the" the "the" and "the" "the" the "the" and "the" subsequent concatenated word can use Pascal case for identifiers of three or more characters. For example:
The "a" identifier is lowercase and the ' a ' subsequent concatenated word is capitalized. For example:
All letters in the identifier are capitalized. Use this convention to identifiers that consist of two or fewer letters. For example:
You are might also have to capitalize identifiers-maintain with compatibility, existing symbol unmanaged, where all Uppercase characters are often used for enumerations and constant values. In general, these symbols should is visible outside of the assembly that uses them.
The following table summarizes the capitalization rules and provides examples for the different of types.
Identifier Case Example
Class Pascal AppDomain
Enum type Pascal ERRORLEVEL
Enum Values Pascal fatalerror
Event Pascal ValueChange
Exception class Pascal WebException
Note Always ends with the suffix Exception.
read-only Static Field Pascal redvalue
Interface Pascal IDisposable
Note Always begins with the prefix I.
Method Pascal ToString
Namespace Pascal System.Drawing
Parameter Camel TypeName
Property Pascal BackColor
Protected instance field Camel Redvalue
Note rarely used. A is preferable to using a protected instance field.
Public instance field Pascal Redvalue
Note rarely used. A is preferable to using a public instance field.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.