VB.NET and CSharp Refactoring

misc_vol4_008

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/

Related Post

One Response to “VB.NET and CSharp Refactoring”

Leave a Reply

Comment Policy:

  • You must verify your comment by responding to the automated email that is sent to your email address. Unverified comments will never show.Leave a good comment that adds to the conversation and I'll leave your link in.
  • Leave me pure spam and I'll delete it.
  • Leave a general comment and I'll remove the link but keep the comment.

Notify me of followup comments via e-mail

Bear