简体   繁体   中英

How do I extract an interface in MSVS Community 2015 (14.0.25123.00)

I'm using Microsoft Visual Studio Community 2015 Version 14.0.25123.00 Update 2 with JetBrains ReSharper Ultimate 2016.1.1
Build 105.0.20160504.101434

I'm trying to do an "Extract Interface" but cannot find the option. I found a solution that said that there should be a refactor option on the Edit menu but I can only find "Refactor" under the ReSharper menu.
I would have expected ReSharper to have increased my refactoring options not decrease them.

Is there an option that I need to set that I'm missing or do I need to uninstall ReSharper? 在此处输入图片说明

Your class is static. Static classes can't have interfaces.

More to the point, all interface methods and properties have to be class instances. Since a class marked static will only have static properties and members it is impossible to create an interface for one. Resharper is correct in not suggesting the option to extract an interface.

What version of Resharper are you using? It should be under Right Click -> Refactor -> Extract -> Extract Interface

Once I uninstalled ReSharper, it the refactor menu showed back up on the edit menu
(it wasn't there while ReSharper was installed)
I was using
JetBrains ReSharper Ultimate 2016.1.1
Build 105.0.20160504.101434 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM