The functionality to extract an interface from a class (C#) seems to change in VS 2017. How can I do that in Visual Studio 2017.
Place your cursor in the class name. Press Ctrl+R, then Ctrl+I. (Your keyboard shortcut may be different based on which profile you've selected.) Press Ctrl+. to trigger the Quick Actions and Refactorings menu and select Extract Interface from the Preview window popup.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With