Long acronyms should be pascal-cased
This page is specific to:.NET Framework Version:2.0
Visual Studio Team System
Long acronyms should be pascal-cased

TypeName

LongAcronymsShouldBePascalCased

CheckId

CA1705

Category

Microsoft.Naming

Breaking Change

Breaking

Cause

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

Rule Description

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.

How to Fix Violations

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

When to Exclude Warnings

Do not exclude a warning from this rule.

Related Rules

Identifiers should be cased correctly

Identifiers should differ by more than case

Short acronyms should be uppercase

Community Content

More Information
Added by:David M. Kean - MSFT

For more information on the guidelines this rule enforces, see the following external resources:

Capitalization Conventions, Design Guidelines for Developing Class Libraries
http://msdn2.microsoft.com/en-us/library/ms229043.aspx

Page 36, Framework Design Guidelines: Conventions, Idioms and Patterns for Reusable .NET Libraries
Krzysztof Cwalina and Brad Abrams
http://www.amazon.com/gp/product/0321246756/002-6248839-4752853?v=glance&n=283155

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View