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

Make Method/Property Static refactoring

Last modified: 08 March 2021

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