Resharper4.5: Enhance your. net Development

Source: Internet
Author: User

Resharper4.5:Enhance your. NetDevelopment

Introduction

ReSharper is the most intelligent Microsoft Visual Studio plug-in. It includes a series of rich features that greatly increase the productivity of C # and Visual Basic.net developers. With ReSharper, you can perform in-depth code analysis, Intelligent Code assistance, real-time error code highlighting, code analysis within the solution range, fast code correction, and code formatting and cleaning in one step, industry-leading Automatic Code refactoring, advanced integrated unit testing solutions, and powerful in-solution navigation and search. Essentially, ReSharper features can be used in C #, VB.net, XML, Asp.net, XAML, and build scripts. ReSharper also provides enhanced cross-language functions for C # And VB.net, allowing developers to effectively control. net hybrid projects.

If you are interested, you can find more instructions on key features of ReSharper.

For more information about ReSharper 4.5

We just released the long-awaited ReSharper 4.5!

In addition to enhancing the ReSharper feature of the original version, we focus on performance and memory usage. When developing ReSharper4.5, making this tool more agile and robust and responsive is our main goal. In the face of the challenge of providing developers with a productivity enhancement tool, we focus on providing strong performance. Obviously, ReSharper4.5 is 4.1 faster than the 30% loading solution, and frequently used search members are twice faster than 4.1, saving about 45% of the input time for intelligent assistance. The memory consumption for analyzing large files is also greatly reduced, which will benefit developers of Asp.net and Linq to SQL. In short, Resharper provides wider enhancements without reducing the response speed.

ReSharperPerformance Improvement

ReSharper 4.5 also brings a wide range of improvements and significant performance improvements.

L warnings and suggestions for the scope of the new solution: analyze non-private type and type members during free time throughout the solution.

L Visual Basic 9 support: enhanced experience in ReSharper cross-language reconstruction and editing now supports VB9 code, including variable-type local variables, object initialization, anonymous types, and extension methods.

L improved naming and conversion mechanism: Now you can define your own naming style framework for different languages and identifiers, and use your specific code guidelines for ReSharper to complete and generate code.

L new embedded field reconstruction and enhanced existing reconstruction productivity.

L to implementation: directly transfers a reference or member of a basic type to any of its direct implementation, ignoring the intermediate abstract class and/or interface.

To get a new, faster ReSharper, download from here

Key features of ReSharper C #3.0 deep analysis

ReSharper analyzes your code for the entire solution to listen to errors and warnings, and highlights them in real time (when you enter them. For most errors, it immediately provides a solution to the problem through smart correction. It also provides Code Recommendations and clues, which provide insight into the code structure and logic and draw your attention to potential design errors. You can also comment out your code so that ReSharper can better analyze your code.

ReSharper provides comprehensive support for C #3.0, including LINQ, implicit type local variables and arrays, extension methods, automatic attributes, lambda expressions, object and set initialization, and anonymous type, expression Tree, and some methods. ReSharper will immediately let you know whenever there is an error or invalid code in your code.

Read more C # code analysis

Advanced Code assistance

ReSharper provides many shortcuts to simplify code tasks to increase productivity and save your time. In the screenshot above, we recommend that you add the missing using or import the correct full name when you enter the type name. It can quickly generate code using different code templates, view the types and their member documents in the editor, and execute code conversion using context actions, there are more.

ReSharper uses three types of code to expand and improve the intelligence of Visual Studio. It is recommended to access only the type in the current scope after the identification is completed. Intelligent task completion is very effective. It filters member methods and variables in real time to match your input expression. The import symbol is complete, which makes it possible to complete the type name and Extension Method in the current project. It also automatically adds the appropriate using reference when needed. In addition, you can use a simple shortcut to automatically add necessary syntax elements (braces, semicolons, etc.) and place the cursor at an appropriate position to start the next sentence.

Read more advanced code assistance for ReSharper

Numerous code refactoring

In the Visual Studio environment, ReSharper provides a wide range of Automatic Code refactoring functions for C # and Visual Basic.

Change Signature

Copy type

Make the method non-static (non-shared)

Change abstract class to interface

Encapsulation Field

Make the method static (SHARE)

Convert anonymous type to named type

Extract class from Parameter

Move static members

The conversion extension method is a simple static method.

Extraction Interface

Move the type to another file or namespace

Convert an index (default attribute) to a method

Extraction Method

Move the type to the outer layer

The conversion interface is an abstract class.

Extract superclass

Pull members to the base class

The conversion method is index (default attribute)

Inline ① Method

Put members into child classes

Convert method to attribute

Inline variables/Fields

Rename

Convert property to automatic Property

Introduce Fields

Replace the constructor with the factory Method

Convert attributes to methods

Introduce Parameters

Secure deletion

Convert static methods to extension methods

Introduce variable

If possible, try to use the base class

Every code refactoring should analyze the entire scope of the selected application (this may be your entire solution), including cross-language code, use this insight to modify the code structure in the most intelligent way possible. You can rename, move, and safely delete identifiers, import and inline ① fields, variables and parameters, convert attributes to automatic attributes and methods, and convert static methods to extension methods. In addition, quick correction and context actions are used to make various simple code transformations (just for convenience and availability) possible.

①: Inline here refers to embedding the variable or method body defined outside into the code in use.

Read more about using ReSharper to refactor C # And VB.net code

Navigation and search

No matter when you need to find a type, field, method, or any other identifier, ReSharper provides multiple implementation methods by name, in the code, navigate from the reference position to the declared position of the ID, find and highlight the ID usage. You can use a simple shortcut at the current location to implement all available navigation behaviors.

In addition, ReSharper allows you to see the complete type inheritance tree and file structure in the special tool window integrated into the Visual Studio user interface.

ReSharper has extended a series of navigation and search features for recent edits-a drop-down list of files or identifiers you have recently modified.

Read more about navigation and search

Code cleanup

Code Cleanup is a shortcut with dozens of ReSharper features (Code Cleanup is a shortcut cut for a dozen of ReSharper features). The Code is formatted according to the custom style and the "this" qualifier is arranged, remove redundant code, convert fields to automatic Attributes Based on alternate fields, set the fields to read-only, optimize the using command, simplify the reference, update the file header, and replace the explicit type with vars, or use more settings to modify your C # code.

Optimize the import command for VB.net, simplify the reference appropriately, and format your code according to the format style. You can clean up the code in batch mode, so you can immediately clean up the entire project and even the solution.

Read more about code cleanup

Cross-language functions

In order to mix C # And VB.net projects, ReSharper helps you keep all parts of your code working smoothly and easily navigate between your code.

All navigation and search actions take the code of all languages into account, including C #, VB.net, Asp.net, and XAML. You can navigate to use, declaration, inheritance, base class, and more-Cross Language. Whenever possible, it will be automatically referenced and corrected by using refactoring, context actions, or quick modifications that cover two major languages. Unit tests are available, and both C # And VB.net write unit tests are the same.

Read more ReSharper cross-language functions

ASP.net support

You can now edit the Asp.net file in a pleasant and efficient manner by using error highlighting, quick correction, context actions, code assistance, navigation, refactoring, and other features. With ReSharper, You can edit and refactor C # code in Asp.net without interrupting, such as Web control attributes and events, data sources, and content point operators.

Read more about Asp.net support

XML support

ReSharper provides some time-saving XML features, including type completion, navigation to reference type, highlighting, replacing and moving tags, navigation between two tags and opening/disabling tags, use Code assistance and Live Templates.

Read more XML support

Supported by XAML

The XAML features include XML editing in the XAML code, all ReSharper Code Completion features, several refactoring (including renaming and refactoring), and real-time error prompts, semantic and syntax analysis. The screenshot above shows the agile code in the XAML resource to complete the work.

Read more XAML support

Integration Unit Test

ReSharper automatically detects unit tests in the Code and provides complete unit test support. You can run and debug the test from the code editor. At the same time, a dedicated unit test resource window will show you the structure of your unit test and any combination tests that run one or more unit test sessions.

Read more ReSharper Unit Tests

NAnt and MS Build script editing

Advanced editing capabilities can be used only for C #. Now NAnt and MSBuild scripts are extended, providing complete code assistance for generating scripts, A large number of navigation and search features, file structure, real-time error highlighting and quick modification.

Read more about NAnt and MS Build script editing.

For details about the ReSharper feature, go to the ReSharper feature page.

Why ReSharper?

Including unprecedented support for C #3.0, Visual Basic.net, XML, XAML, and Asp.net, and the complete cross-language functions, ReSharper is confident that it provides Visual Studio developers with higher satisfaction than before.

 

This tool reduces the time you spend on regular transactions and repetitive manual work, allowing you to spend more time focusing on existing tasks. Its numerous automatic error checking and code correction features can reduce development time and improve your work efficiency. You will find that ReSharper will soon be able to offset its purchase costs by improving development efficiency and code quality. With ReSharper,. net developers will experience "happy development ".

Download ReSharper4.5 now

Authorization

About the author

JetBrains s. r. o.


Member

Location: Russian Federation

Original article: http://www.codeproject.com/KB/showcase/ReSharper4_5.aspx

 

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.