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

Inline Class refactoring

Last modified: 22 September 2022

Refactor | Inline | Inline...

N/A

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.