Visual Studio Team System
Identifiers should differ by more than case

TypeName

IdentifiersShouldDifferByMoreThanCase

CheckId

CA1708

Category

Microsoft.Naming

Breaking Change

Breaking

Cause

The names of two types, members, parameters, or fully qualified namespaces are identical when converted to lower-case.

Rule Description

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.

How to Fix Violations

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

When to Exclude Warnings

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

Related Rules

Identifiers should be cased correctly

Long acronyms should be pascal-cased

Short acronyms should be uppercase

Tags :


Community Content

David M. Kean - MSFT
Example

This rule only fires on publicly visible members.

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; }
        }
    }
}
Tags :

Page view tracker