//
you're reading...
.NET 2.0

The advantages of having refactoring support in your IDE

Its really nice to make what could be considered a large, sweeping change and have that change take place in all occurances of your code automatically. In my case I renamed some of my forms to end with “Dialog” since they were in fact dialog boxes rather than regular forms.

All I did was rename the file from “EnterPassword.cs” to “EnterPasswordDialog.cs” the IDE took care of everything else: Renaming the class in the source files, “EnterPasswordDialog.cs” and “EnterPasswordDialog.Designer.cs”, renaming any usage of the class to EnterPasswordDialog. And of course you get to preview all of the changes before they are made.

This probably wasn’t too big of a deal because most of the dialogs I wrote weren’t hooked into the program yet so the only changes made were to the two files for that dialog. But since you can rename any class, it could become a big deal when you are renaming a class that is used all throughout your codebase.

Maybe its not a really big deal; but anything that saves me from having to hunt through the source code for references is a good thing in my book.

Edit:
Refactoring C# Code Using Visual Studio 2005 covers more of the refactoring features available; but it didn’t touch on what I mentioned above.

Advertisements

About James

I am a Senior Developer/Consultant for InfoPlanIT, LLC. I previously spent over 7 years as a Product Manager for what eventually became ComponentOne, a division of GrapeCity. While there, I helped to create ActiveReports 7, GrapeCity ActiveAnalysis, and Data Dynamics Reports.

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archive

%d bloggers like this: