How to extract interface from class in Visual Studio 2017

Extract an interface refactoring

Place your cursor in the class name.

Press Ctrl+R, then Ctrl+I.

https://docs.microsoft.com/en-us/visualstudio/ide/reference/extract-interface?view=vs-2019


Right-click the class name and select "Quick Actions and Refactorings..." and then select "Extract interface..."

Note that you can also click on the class name and press Ctrl+. to bring up the same context menu.


With ReSharper installed, right click the class name: Refactor > Extract > Extract Interface...

Keep in mind that the Extract Interface... option is not even in the menu if the class is static. The same goes for the class members if they do not appear in the menu where you select what goes in the interface.

I completely forgot that you cannot have a static class with an interface or extends at all for that matter.