A: reshaper introduction
Reshaper is a third-party plug-in for the C # Development IDE Tool Visual Studio, Reshaper makes VS stronger.
The advantage is that it provides some features that are easier for programmers to build on VS, and the disadvantage is that it consumes more memory and may slow down your less powerful development machine.
After installation, there is a reshaper option in the Menu in Visual Studio.
II: ReSharper Configuration
2.1 Smart Tips
When the installation is complete, the IDE's Smart Hints (IntelliSense) will use the Resharper prompt by default. Change it, in the option window:
2.2 Shortcut keys
It is strongly recommended that you use Reshaper shortcut keys, do not worry about Reshaper will put your original shortcut key set to overwrite, because if a shortcut key and VS is conflict, Reshaper will let you choose to use VS or Resharper shortcut keys, see the following interface:
Note, do not choose Apply to all Reshaper shortcuts, if you choose, this interface will no longer appear, and generally, you will prefer to make your own decision in the conflict.
Of course, if you must use the VS original shortcut, then you should select the option in the Red box in the following window of option, then click Save:
2.3 Member hints and error hints
ReSharper after installation, will do a few things, these things for other than this user, more trouble, so summarize:
(1), will be the option--text editor--c#--general--Automatically list Members this selection box is removed. This way, when you use a method, you do not prompt the parameter, you can manually tick it.
(2), will be the option-text editor--c#--advanced-Display real-time semantic errors, in the edit with the underlined identification error two options removed. However, if uninstalling the Resharper,vs editor will not prompt the error in real time. So after uninstalling the ReSharper, the two options need to be checked again.
24,000 can Alt + Enter
If we use the Reshaper shortcut setting, then, at each prompt, click ALT + Enter key combination, will pop up Resharper suggest you want to do, such as:
At the prompt Reshaper tells us not to reference System.Text this namespace, this time, click Alt + Enter will automatically Using the namespace;
Alt+enter the key combination on the StringBuilder, you will be prompted to use VAR here;
Some of the complex LINQ you won't write, using Alt+enter will automatically help you convert some of the code into a very forked LINQ statement, using fast.
2.5 Find Usage
In a class, or in a variable, or on a method, the Find Usage, or the stamp shortcut ALT + F7, is the place where all of your selected classes or variables or methods are referenced.
In particular, we note that in the picture, it will be you many times to find the form of a tab to keep you, we are in the analysis of the code, often a one-time lookup of multiple variables of the reference, at this time, it is particularly helpful.
2.6 Refactoring
As a code farmer, we all know that code is refactored and never designed. So, you'll always need Refactorthis or CTRL + Shift + R:
Remove Parameters--Move to change Signature (changing method signature)
Extraction Methods--extract Method
Rename--rename (ReSharper will provide you with a few optional best names based on the type name of the object)
Extract Interface--extract Interface (additional Extract superclass extracted as base class)
Extract Classes--extract class
Promote local variables--introduce Variable
Encapsulate Fields--introduce Field
View file structure files structure shortcut keys: Ctrl + Alt + F
2.7 Configure F12 View code jump, implement F12 can view source code, from so easy!!!
Three. ReSharper shortcut keys
Shift+ctrl+t: File Lookup Shift+alt+t: class, Method Lookup
Note:
Zengming
Blog: http://www.cnblogs.com/zengming/
This article is original, welcome to reprint, but the reprint must indicate the source of the article, and at the beginning of the article is clearly linked to the Ming.
Welcome to the exchange of discussions
Configuration and use of ReSharper