Shortcut for extract local variable in Visual Studio or ReSharper (for C#)

点点圈 提交于 2019-12-01 22:10:28

Right-clicking a local variable, I get this context menu:

Assuming you want shortcuts for the highlighted commands, you can define your own shortcuts through the Visual Studio keyboard mapper. (Tools -> Options -> Environment -> Keyboard)

  • Introduce Variable... = "ReSharper.ReSharper_IntroVariable"
  • Introduce Field... = "ReSharper.ReSharper_IntroduceField"
  • Introduce Parameter... = "ReSharper.ReSharper_IntroParameter"

FYI My keyboard shortcuts were set by ReSharper via ReSharper -> Options -> Keyboard & Menus and applying the "Visual Studio" scheme.

(Using Visual Studio Community 2015 and ReSharper Ultimate 2015.2)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!