Convert Interface to Abstract Class refactoring

Last modified: 08 March 2021

ReSharper | Refactor | Convert | Method to Indexer…

To assign a shortcut, go to Tools | Options | Environment | Keyboard and find the ReSharper_Function2Indexer command.

This refactoring converts interfaces into abstract classes thus helping you quickly change hierarchical dependency among a set of classes and interfaces.

Consider the following example:

This feature is supported in the following languages and technologies:

The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see corresponding topics in the ReSharper by language section.