JustCode

The Convert Interface To Abstract Class refactoring allows you to easily convert an interface to an abstract class.

Note

Language Support

Supported: C#, VB.NET

Not relevant: JavaScript, ASP.NET,XAML, HTML

To convert an interface to an abstract class

  1. Select the name of the interface you want to convert.

    Convert Interface To Abstract Class Selected
  2. Press Alt+Insert. From the pop-up menu select Convert Interface To Abstract Class.

  3. Telerik JustCode will convert the interface to an abstract class. All interface members will be made abstract.

  4. The result is:

    Convert Interface To Abstract Class Result
Caution

If a class that inherits the interface, that is to be converted, already has a base class a warning will be shown before executing the fix.

Convert Interface To Abstract Class Base Class Warning

A warning will also be shown if an interface implements the selected interface.

Convert Interface To Abstract Class Interface Warning
Tip

To convert an interface to an abstract class you can also navigate on the main menu. Choose JustCode | Refactor | Convert Interface To Abstract Class.