ReSharper Web Help

The Make Method/Property Non-Static refactoring allows you to convert a static method or property into an instance method or property. All calls, implementations and overrides of the method or property are automatically updated. Reverse functionality is available with the Make Method/Property Static refactoring.

To make a method or property non-static
  1. Place the caret at the name of a static method or property in the editor.
  2. Do one of the following:
    • On the main menu, choose ReSharper | Refactor | Make Method Non-Static.
    • Right-click, then click Refactor | Make Method Non-Static on the context menu.
    • Press Ctrl+Shift+R, then click Make Method Non-Static.
  3. The Make Method Non-Static dialog box opens. Select an instance parameter from the list. If required, the instance parameter will be substituted with this in the method or property body.

  4. Select visibility for the new instance member in the Visibility section.
  5. Click Next. If no conflicts are found, the refactoring is performed immediately. Otherwise, resolve conflicts.

See Also