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.

Identifiers should differ by more than case







Breaking Change


The names of two types, members, parameters, or fully qualified namespaces are identical when they are converted to lowercase.

Identifiers for namespaces, types, members, and parameters cannot differ only by case because languages that target the common language runtime are not required to be case-sensitive. For example, Visual Basic is a widely used case-insensitive language.

This rule fires on publicly visible members only.

Select a name that is unique when it is compared to other identifiers in a case-insensitive manner.

Do not suppress a warning from this rule. The library might not be usable in all available languages in the .NET Framework.

The following example demonstrates a violation of this rule.

using System;
namespace NamingLibrary
    public class Foo	// IdentifiersShouldDifferByMoreThanCase    
        protected string bar;

        public string Bar        
            get { return bar; }        

Community Additions

© 2015 Microsoft