Resharper rename feature similar to Visual Studio

2019-09-08 23:11发布

问题:

When you're using Visual Studio refactoring features you may change the name of variable / class name, etc., press ctrl + . and you're able to apply rename to this change. When you're using Resharper you have to say up front that you want to rename it (you have to press ctrl + r + r or f2). Is it possible in Resharper to change the name and then say you wanted full rename?

Thanks in advance for help!

回答1:

Yes. Starting from version 6.0, you can change the name of a symbol declaration first, and press Alt+Enter to apply the in-place rename refactoring. Similar in-place rename functionality is available for "Change signature" and "Move static members" refactorings. Note that this only works when you're at symbol declarations. If you want to rename a symbol from its usage, you still have to use the regular Rename refactoring available via F2.