The requested page is not available for the requested platform. You are viewing the content for Default platform.

Unused member

CodeRush Classic shows the Unused member code issue if a private member is not used within its enclosing type.

Fix

Remove the unused declaration.

Purpose

Highlights the private never referenced members, which can be removed to improve code readability.

Example

class Class1
{
  public Class1(string name)
  {
    Name = name;
  }
  public string Name { get; set; }
  private object _Data;
}

Fix:

class Class1
{
  public Class1(string name)
  {
    Name = name;
  }
  public string Name { get; set; }
}