This project is read-only.
1
Vote

Implement Interface through member adds extra casts

description

Source:
sealed class X : IComparer{
    X x;
}
Quick fix:
    public int Compare(object x, object y) {
        return ((IComparer)this.x).Compare(x, y);
    }
Why do you add the cast, even when there is no explicit implementation?
The cast is highlighted as unnecessary (only when the class is sealed)

comments