VB.NET and CSharp Refactoring
I sent out the following tweet last week:
“Where’s the refactor menu option?! Oh, wait. This is VB.NET, they don’t have that feature.”
Almost immediately, I got responses. The most helpful was from @RoryBecker letting me know about CodeRush XPress by Devexpress.com
This tool does way more than I was immediately looking for and it is free.
Instead of just allowing me to promote a block of code to a method it will:
- Add parameters to your methods and update all the calls to that method for you.
- Promote variables to parameters
- Promote local variable to member variables (and rename to your member variable notation, ie _variableName or m_variableName)
- Remove parameters and update all the calls to that method for you
- Combine nested conditionals
- Compress if/then/else to ternary
- Variable declaration help.
- Promote blocks of code to methods
- Convert blocks of code to anonymous methods
- …
The list goes on and on.
And it is all free if you own Visual Studio.
There is, of course, a paid version that does even more.
The only real downside to a tool like this is that you have to learn a completely new way of programming to be really efficient using it. But I think that’s a really small price to pay considering the efficiency you’ll receive.
Check it out
http://www.devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/
[...] VB.NET and CSharp Refactoring (Dave M. Bush) [...]