NRefactory icon indicating copy to clipboard operation
NRefactory copied to clipboard

Check for arguments names mismatch in interface implementations analogous to methods overrides

Open Uriel6575 opened this issue 12 years ago • 0 comments

With code like this you'll have a "parameter name differs" warning:

public class Base {
    public virtual void Foo(int bar) {
    }
}

public class Derived: Base {
    public override void Foo(int bazz) {
        base.Foo(bazz);
    }
}

But when you implement interface methods no check occurs:

public interface IFoo {
    void Foo(int bar);
}

public class BarImplicit: IFoo {
    public void Foo(int bazz) {
    }
}

public class BarExplicit: IFoo {
    void IFoo.Foo(int bazz) {
    }
}

Uriel6575 avatar Jan 21 '14 05:01 Uriel6575