Resharper configuration and usage, resharper Configuration

Source: Internet
Author: User

Resharper configuration and usage, resharper Configuration

I. Reshaper Introduction

Reshaper is a third-party plug-in for C # development IDE tool Visual Studio. Reshaper makes VS more powerful.
Advantage: it provides some functions that are more convenient for programmer development on the basis of VS; disadvantage: it consumes more memory, it may slow your development machine that is not powerful enough.
After installation, multiple RESHAPER options are added to the Menu of Visual Studio.

Ii. Resharper Configuration

2.1 smart tip
After the installation is complete, the intelligent prompt (intelliisense) of IDE will use the Resharper prompt by default. The change is in the Option window:

2.2 shortcut keys
We strongly recommend that you use the Reshaper shortcut key. Do not worry that the Reshaper will overwrite your original shortcut key, because if a shortcut key conflicts with, reshaper allows you to select whether to use the VS or Resharper shortcut key. See the following interface:

Note: Do not select Apply to all Reshaper shortcuts. If this option is selected, the interface will not appear again. In general, you prefer to make decisions in case of conflicts.
Of course, if you must use the original VS shortcut key, you should select the Option in the red box in the options window below, and then click Save:

2.3 member prompt and error prompt
After Resharper is installed, several things will be done. These things are troublesome for other users, so let's summarize them as follows:
(1) select the option -- text editor -- C # -- General -- automatically list members. In this way, when you use a method, no parameter is prompted and you can manually check it.
(2) The options -- text editor -- C # -- Advanced -- display real-time semantic errors, and underline mark errors in editing are removed. However, if Resharper is uninstalled, The vs editor will not prompt errors in real time. Therefore, After detaching Resharper, you need to re-check the two options.

Alt + Enter with 24 thousand Performance
If we use the Reshaper shortcut key settings, click Alt + Enter in each prompted area, and the Resharper operation is displayed, for example:
When the prompt "Reshaper tells us that the namespace System. Text is not referenced," Alt + Enter "will automatically use the namespace;
In StringBuilder, the Alt + Enter combination key will prompt you to use var here;
You won't write some complicated LINQ statements. Using Alt + Enter will automatically convert some code into a very good LINQ statement, which is quick to use.

2.5 Find Usage
Click Find Usage on a class, variable, or method, or press the shortcut key Alt + F7 to display all the referenced classes, variables, or methods you selected.

In particular, we noticed that in the figure, it retained you for multiple searches in the form of a tab. When we analyze the code, multiple variables are often referenced at a time, which is particularly helpful.

2.6 Reconstruction
We all know that code is restructured and never designed. Therefore, you always need RefactorThis or Ctrl + Shift + R:

Remove parameter -- move to Change Signature (Change method Signature)
Extraction Method -- Extract Method
Rename -- Rename (Resharper will provide you with several optional names based on the object type name)
Extract Interface -- Extract Interface (Extract Superclass extraction is added as the base class)
Extract Class -- Extract Class
Upgrade the local Variable-Introduce Variable
Encapsulation Field -- Introduce Field

To view the File Structure, press Ctrl + Alt + F.

2.7 configure F12 to view the code jump, and implement F12 to view the source code. so easy !!!

3. Resharper shortcut

Shift + Ctrl + T: file search Shift + Alt + T: Class, Method Search

Note:

Author: zengming

Blog: http://www.cnblogs.com/zengming/

This article is original. You are welcome to repost it. However, you must indicate the source of the article and clearly give the link at the beginning of the article.

Welcome to discussion

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.