JetBrains Rider
 
Get JetBrains Rider
You are viewing the documentation for an earlier version of JetBrains Rider.

Convert Abstract Class to Interface refactoring

Last modified: 08 March 2021

This refactoring allows you to convert an abstract class to an interface. This can be useful when you want a class to inherit from more than one abstract classes — then you can easily convert one of them to an interface.

Consider the example below. After applying the refactoring, a class is converted into an interface:

By default, the naming style for interfaces requires interface names to start with I. Therefore, if you did not change the settings, the interface name will be highlighted as inconsistently named. Just press Alt+Enter and use the corresponding quick-fix to  rename the interface.