ReSharper Web Help

This dialogless refactoring converts an extension method to a static method in the same class.

The reverse functionality is available with the Convert Static to Extension Method refactoring.

To convert an extension method to a static method
  1. Place the caret at the name of an extension method, or select it in the File Structure window.
  2. Do one of the following:
    • On the main menu, choose ReSharper | Refactor | Convert | Extension Method to Plain Static.
    • Choose Refactor | Convert | Extension Method to Plain Static.
    • Press Ctrl+Shift+RCtrl+Shift+R, then click Extension Method to Plain Static.
  3. The refactoring is carried out without requiring you to specify any further options.

For a sample of modifications in method signature and calls caused by using the refactoring, see Convert Static to Extension Method.


This feature is supported in the following languages/technologies:

C# VB.NET HTML ASPX Razor JavaScript TypeScript CSS XML XAML RESX Build Scripts
feature_available feature_available

Tip

The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see the corresponding topics in the ReSharper by Language section.

See Also

Procedures: