Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Previous Versions
.NET Framework 3.0
Tools
Development Tools
FxCop
FxCop Warnings
Naming Warnings
 Use preferred terms
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual Studio Team System
Use preferred terms

TypeName

UsePreferredTerms

CheckId

CA1723

Category

Microsoft.Naming

Breaking Change

Breaking

The name of an externally visible identifier includes a term for which an alternative, preferred term exists.

This rule parses an identifier into tokens. Each single token and each contiguous dual token combination is compared against terms built into the rule and in the Deprecated section of any custom dictionaries. The following table shows the terms built into the rule and their preferred alternatives.

Obsolete term Preferred term

ComPlus

EnterpriseServices

Cancelled

Canceled

Indices

Indexes

LogIn

LogOn

LogOut

LogOff

SignOn

SignIn

SignOff

SignOut

Writeable

Writable

To fix a violation of this rule, replace the term with the preferred alternative term.

Exclude a warning from this rule only if the name of the identifier intentionally and specifically relates to the original term, as opposed to the preferred term.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Cancelled vs. Canceled      Shawn Poulson   |   Edit   |   Show History

Dictionary.com listed 'Canceled' as the past tense of Cancel, where 'Cancelled' as a British spelling of that tense.  http://dictionary.reference.com/browse/canceled

Merriam-Webster merely lists both forms as inflected forms.  http://www.m-w.com/dictionary/canceled

Tags What's this?: Add a tag
Flag as ContentBug
in/out on/off      Kyle Huntley   |   Edit   |   Show History

I'd love to understand why "Log" goes from in/out to on/off and "Sign" does the opposite and goes from on/off to in/out.

There must be a deeper meaning here...  Is there an important semantic difference between Log[in|on] and Sign[in|on] that warrants different naming styles?

Sorry, just being picky and I wanted to try out the community content feature!

Tags What's this?: Add a tag
Flag as ContentBug
Log vs. Sign      Adam Vandenberg   |   Edit   |   Show History
I wouldn't mind seeing the "LogXyz" forms completely deprecated in favor of the "SignXyz" forms.
Tags What's this?: Add a tag
Flag as ContentBug
English for Cancelled      Nick Wallace   |   Edit   |   Show History

If you'd like to override the preferred terms and use British English for 'Cancelled' rather than the American version 'Canceled', forget about it. Even if you put it in the the CustomDictionary.xml it will be overridden by the built-in rule.

  <Deprecated>
            <Term PreferredAlternate="Cancelled">Canceled</Term>
  </Deprecated>

 

Tags What's this?: Add a tag
Flag as ContentBug
re - why is 'Cancelled' an obsolete term?      Chris Ross ... MNK Boulos   |   Edit   |   Show History

... because it's English English, not American English - and the American's fired the English as the arbiters of the language a few hundred years ago. *grin*

ps - I'm 50% English and 50% American, grew up 'over there' but now live 'over here' (and does it matter which is which?). "When in Rome, ..." and all that seems to apply (Microsoft is, after all, an American company).

 

It is also a global company!

Tags What's this?: Add a tag
Flag as ContentBug
Why is &quot;Cancelled&quot; an obsolete term?      unRheal ... Sean Kinsey   |   Edit   |   Show History

I have checked in the .NET Framework Developer's Guide  under the section Best Practices for Implementing the Event-based Asynchronous Pattern and it asserts that "In the case of cancellation, set the Cancelled flag in the AsyncCompletedEventArgs object".

Which guideline has precedence?

Tags What's this?: Add a tag
Flag as ContentBug
Indices vs. Indexes      Gregory C Lee   |   Edit   |   Show History
I believe that indices should be used when the meaning is a plural of the noun index and indexes should be used only for the present tense of the verb to index . English is sufficiently imprecise without unnecessarily compounding the problem.
Tags What's this?: Add a tag
Flag as ContentBug
Is CheckId correct?      alexsh   |   Edit   |   Show History
Visual Studio shows this rule as CA1726. Who is right?
Overriding a particular term without disabling CA1723      Peter Ritchie   |   Edit   |   Show History

If you would like to override this behaviour for a particular term, simple add the term to the <Unrecognized> element of CustomDictionary.xml. For example, with the following section:

  <Unrecognized>
<Word>canceled</Word>
</Unrecognized>

...this warning will not be raised when "Cancelled" is encountered.

Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker