Search code examples
c#visual-studioautomated-refactoring

How to refactor a bunch of methods to make them static?


We found that a bunch of methods in our code could be made static (since they are functional in nature, and do not alter any data in the class). This means of course that all references to these methods must be changed also.

Is there a refactoring command available to do this quickly and safely?


Solution

  • https://www.jetbrains.com/resharper/webhelp/Refactorings__Make_Method_Static.html

    Check #Resharper i think this is what you are looking for but i am not sure about license.