David Thielen
David Thielen

Reputation: 33046

ReSharper: Refactor to eliminate an in-between interface

I have a situation where I now have an interface with nothing in it:

public interface IStuffEx : IStuff
{
}

It made sense in the past but, we've moved everything in it to IStuff, because of mix/match issues.

I have 187 uses of IStuffEx that I need to change to IStuff.

Does ReSharper have a refactor to do this? I assumed it does but I can't find it.

Upvotes: 2

Views: 40

Answers (1)

David Thielen
David Thielen

Reputation: 33046

Found it! It's "use base type where possible." Worked like a charm and replaced every use.

You still have the interface after the refactoring runs, but it's not in use anywhere. So then you can delete it.

Upvotes: 2

Related Questions