CA1726: Use preferred terms

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see CA1726: Use preferred terms on docs.microsoft.com.

TypeNameUsePreferredTerms
CheckIdCA1726
CategoryMicrosoft.Naming
Breaking ChangeBreaking - when fired on assemblies

Non-breaking - when fired on type parameters

The name of an externally visible identifier includes a term for which an alternative, preferred term exists. Alternatively, the name includes the term Flag or Flags.

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

Obsolete termPreferred term
ArentAreNot
CancelledCanceled
CantCannot
ComPlusEnterpriseServices
CouldntCouldNot
DidntDidNot
DoesntDoesNot
DontDoNot
Flag or FlagsThere is no replacement term. Do not use.
HadntHadNot
Hasn’tHasNot
HaventHaveNot
IndicesIndexes
IsntIsNot
LogInLogOn
LogOutLogOff
ShouldntShouldNot
SignOnSignIn
SignOffSignOut
WasntWasNot
WerentWereNot
WontWillNot
WouldntWouldNot
WriteableWritable

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

Suppress a warning from this rule only if the name of the identifier is intentional and relates specifically to the original term instead of the preferred term.

Naming Warnings

Show: