Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Identifiers should not match keywords







Breaking Change


The name of a namespace, type, or a virtual or interface member matches a reserved keyword in a programming language.

Identifiers for namespaces, types, or virtual or interface members should not match keywords defined by languages that target the common language runtime. Depending on the language in use and the keyword, compiler errors and ambiguities can make the library difficult to use.

This rule checks against keywords in the following languages:

  • Visual Basic

  • C#

  • C++/CLI

Case-insensitive comparison is used for Visual Basic keywords, and case-sensitive comparison is used for the other languages.

Select a name that does not appear in the list of keywords.

You can suppress a warning from this rule if you are convinced that the identifier will not confuse users of the API, and that the library is usable in all available languages in the .NET Framework.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.