Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Long acronyms should be pascal-cased

Visual Studio 2005

TypeName

LongAcronymsShouldBePascalCased

CheckId

CA1705

Category

Microsoft.Naming

Breaking Change

Breaking

The name of an identifier contains an acronym of three or more uppercase letters.

This rule assumes it has found an acronym when the name contains four uppercase letters in a row, or at the end of the name, three uppercase letters in a row.

By convention, two-letter acronyms use all uppercase letters, and acronyms of three or more characters use Pascal casing. The following examples conform to this naming convention: 'DB', 'CR', 'Cpa', and 'Ecma'. The following examples violate the convention: 'Io', 'XML', and 'DoD', and for non-parameter names, 'xp' and 'cpl'.

Naming conventions provide a common look for libraries that target the common language runtime. This reduces the learning curve required for new software libraries, and increases customer confidence that the library was developed by someone with expertise in developing managed code.

Change any three-letter acronyms in the name to Pascal case, and change any two-letter acronyms to uppercase.

Do not exclude a warning from this rule.

Community Additions

ADD
Show:
© 2015 Microsoft