Unused type parameter

CodeRush shows the Unused type parameter code issue if a type parameter of a private generic class or method is never referenced.

Fix

Remove the redundant type parameter.

Purpose

Highlights the never referenced type parameters, which can be removed to improve code readability.

Example

public class MyClass<TType>
{
    public MyClass(string name)
    {
        Name = name;
    }
    public string Name { get; private set; }
    public object Data { get; set; }
}

Fix:

public class MyClass
{
    public MyClass(string name)
    {
        Name = name;
    }
    public string Name { get; private set; }
    public object Data { get; set; }
}