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 Method refactoring

Last modified: 23 September 2024

This refactoring helps you replace usages of a static, instance, and extension method with its body, and optionally remove the original method declaration.

You can also apply this refactoring to a property with a backing field. In this case, read usages are replaced with the getter body and write usages are replaced with the setter body.

In the example below, we use this refactoring to inline the LogError method:

JetBrains Rider: Inline Method dialog