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

Inline Class refactoring

Last modified: 22 September 2022

This refactoring allows you to merge one class into another class. The class that you merge in is removed, its members are moved to the class where the merged class is used, and all usages of the merged class are updated accordingly.

In the example below, we merge the Painter class (that is, its field myColor and its method InitPainter) into the Circle class.

After applying the refactoring the property or the field is replaced with members of its type. All usages of the property or the field are updated accordingly.

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.