Bug in Convert Abstract Class to Interface?

ReSharper appears to be affecting too many derived classes when it does this operation. For example, say have the following classes:

public abstract class A
{
}

public class B : A
{
public virtual void SomeFunction()
{
}
}

public class C : B
{
public override void SomeFunction()
{
}
}

If you run “Convert Abstract Class to Interface” on ‘A’, ReSharper changes class ‘C’ to be derived from ‘A’ instead of ‘B’ and ‘C’ no longer compiles. I don’t believe ‘C’ should be affected at all by converting ‘A’ to an interface, but even if you think it should then ‘A’ should only be added to ‘C’, but ‘C’ should still derive from ‘B’.

Please sign in to leave a comment.