After over 20 years, I’ve decided to start recognizing the third-party components and add-ins to Visual Studio that I use just about every day and swear by. The first is the only refactoring tool that I have used for Microsoft .NET called CodeRush for Visual Studio by Developer Express Inc. (DevExpress.com). I have tried others, including the very limited refactoring in Visual Studio, but I always come back to CodeRush.

Code refactoring is a very important part of coding and is a skill of any professional developer. If you are new to code refactoring, here is the description of it from Wikipedia.
In computer programming and software design, code refactoring is the process of restructuring existing computer code—changing the factoring—without changing its external behavior. Refactoring is intended to improve the design, structure, and/or implementation of the software (its non-functional attributes), while preserving its functionality. Potential advantages of refactoring may include improved code readability and reduced complexity; these can improve the source code’s maintainability and create a simpler, cleaner, or more expressive internal architecture or object model to improve extensibility. Another potential goal for refactoring is improved performance; software engineers face an ongoing challenge to write programs that perform faster or use less memory.
Many of the teams I’ve worked for recently either do not do this or do not provide a tool like CodeRush for its developers. These tools will pay for themself after the first use! Another thing that most managers do not understand is that tools like this will actually teach their developers the correct way of producing better quality code! It’s a win all around if you ask me!
Now, let’s talk about CodeRush. I will now list the features I use the most. I’d like to point out that CodeRush has always worked for both C# and VB.NET. It now includes support for Razor and XAML.
Code Refactoring
Well, this is the #1 feature of course. With usually just one mouse click you can refactor code with common patterns. Here are some of my favorites:
- Compress to/expand the null coalescing operation
- Compress to/ expand a ternary expression
- Convert to and from an auto-implemented property
- Convert to constant
- Convert to a property with a backing field
- Convert to string interpolation
- Extract interface
- Extract string to a resource (very important for globalization)
- ForEach to For/For to ForEach
- ForEach to Linq
- Import missing namespaces
- Inline method
- Inline temp
- Introducing using statement (very important to prevent virtual memory leaks)
- Move type to file
- Remove redundant assignment
- Remove redundant type qualifier
- Remove type qualifier
- Rename type to match the file
- Simplify expression
- Use expression body
I’d like to point out that many of these refactorings can be done on an entire class at a time which saves a lot of time. Especially if you are refactoring an older codebase.
Other Features
Refactoring isn’t the only thing that CodeRush does. Here are just a few.
- Coding assistance
- Static code analysis
- Code style assistance
- Debugging assistance
- Unit testing assistance
- Decompiling tool
Cost
With all those features, CodeRush is only $49.99! Wow, what a deal. But wait, I have a special offer for you. If you purchase the latest version of my coding standards book, you will get CodeRush for FREE! That is an even better deal. CodeRush and coding standards for only $25! But hurry, offer expires at the end of 2020.
Summary
So I hope you will try CodeRush today! Your tasks will get done quicker and be done better! You won’t be let down.
Discover more from dotNetTips.com
Subscribe to get the latest posts sent to your email.
