Resharper advanced 1

Source: Internet
Author: User
Resharper advanced 1: Brief Introduction

Faced with the following question: why can. Net be developed more quickly than Java? I'm afraid the biggest advantage is that Microsoft provides a very powerful IDE. It is powerful for developers at all levels. When you are a zombie, you can learn Drag & drop. When you start to write code, you will find out how stupid and bloated the code generated by the designer. When you can write clean code yourself, you may not want to switch to the designer (switch/F7 ). I believe that most of us, even the most senior windows developers, are much more efficient in writing code with vs than using notepad, because we need the help of IDE to improve our productivity after all. However, in the era when there was no resharper, your productivity was at most stuck in two wheels, and the other two wheels could only be turned after you became familiar with resharper.

Resharper can improve your efficiency so much that everyone is paying attention to it in the blogs of all. Net experts I subscribe. You need to know that they are not general coder, most of which are CTO or technical director. When I started using resharper three months ago, it was very difficult to find some Chinese or empirical articles. Most people do not seem to care about its existence. The blog is filled with arguments such as slow system installation due to resharper, unstable vs, slower machine response speed, and slower vs startup speed. Fortunately, none of them happened here. It may be because 2G's memory exists, and devenv.exe accounts for 200 ~ The M memory didn't make me feel the machine is slowing down, and my Vs is almost always running. When I close it for a while, so I only need to endure resharper initialization once every half a minute during loading. These problems are trivial compared to the efficiency they can bring you ).

If you almost don't need a shortcut key when writing code in the vs environment, I don't think you have to look down. Because resharper improves your efficiency through shortcuts. But believe me, if you have been abused once and again in the space, you should be able to see how big the shortcut keys have changed.

First, after installing resharper, you can use or view it in three ways:

First, on the menu bar, if it is version 3.0, it will shield the "refactoring" menu bar by default, that is, when you press Alt + R, the drop-down menu of resharper is displayed instead of "refactoring". Why? Because you no longer need to "refactor" the menu. If it is a previous version, such as 2.0, it seems that you need to manually complete this step, the method is as follows:

Tool-custom-Reschedule command, and then delete the "refactoring" menu without hesitation!

You can simply try it like this: Alt + R, N, and press enter to add a class to the current project. Remember how you did it before? Right-click a project in Solution Explorer and choose add -- class from the long pop-up menu. If your computer is slow enough, after 3 seconds, a dialog box will pop up asking you about the file name.

Another method is: Do you see the vertical scroll bar? There is an extra border on the right side of it. There is a "green/yellow/red" box on the top, and a red orange horizontal bar will appear on the border. When the red bars appear, it indicates that your code is wrong at that position. If it is an orange bar, it indicates that it is a warning, most of them do not detect null values or are not used after declaration.

If all errors and warnings in the current document are properly handled, no horizontal bars will appear, and the top box will become green;

If there is no error but there is a warning, it is yellow, then the compilation can be passed;

If the box is red, it indicates that the Code cannot be compiled. In this case, you should click the red bar to modify your code. Even if you compile, an error is reported and cannot be generated. This allows you to discover your errors in time when writing code without waiting for compilation. This also improves your efficiency. It takes at least half a minute to compile your hard disk, and you can strongly read and write your hard disk, especially when the speed of your hard disk is slow, such as in a notebook, this process is so heartbreaking.

The third type of access to resharper is the shortcut key. Right-click menus also have many functions, but they are too slow and slow. What we need is professionalism. The tools we use are not the aunts who wear sweaters, but the developers. If you cannot grasp the shortcut keys, that really requires a big question mark on your development skills. Think about this scenario. When you have this idea in your mind, ah, this class should come up with an interface and ask for this method, this, and this, and these two events. Ah, no. I have to mention it now, or I will forget it. I need to create a new interface. Ah, where to create ...... Built, right. Which methods do I need to extract. (I am dizzy) many times your thoughts are transient, and you need to keep up with your operations accordingly. In resharper, move the cursor to the class name and click Ctrl + Shift + R. In addition to the extraction interface you want, other refactoring functions are also clear at a glance. It is far faster than.

As for right-click, if you cannot remember the shortcut key at the beginning, you can only use it, or Alt + R, it is actually a little faster than the right-click menu.

What is truly exciting is that, as you become familiar with resharper, you will be able to bring a lot of convenience, and I will talk about it in the next series.

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.