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

Make Method/Property Static refactoring

Last modified: 23 September 2024

This refactoring allows you to convert an instance method or a property to a static one. All calls, implementations and overrides are automatically corrected.

If the converted instance method uses instance members, JetBrains Rider helps you add the necessary parameter representing this to apply these usages to. If the converted instance property uses instance members, the refactoring is not available.

In the example below, we use this refactoring to convert an instance method Merge of the Info class into a static method. After refactoring, usages of instance properties Id and Name are applied to the new parameter i1:

JetBrains Rider. 'Make Static' refactoring