JetBrains Rider
 
Get JetBrains Rider
Get your hands on the new features ahead of the release by joining the Early Access Program for Rider 2025.1! Learn more

Inline Class refactoring

Last modified: 23 September 2024

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.