
Refactor Your Code #14
Chapter 2, Master the Editor
|
61
HACK
Using the Lists Manager, you can remove files and projects currently in the
list or add new files or projects using the Add button. Normally you should
not need to edit these lists, but from time to time I like to clear them out.
And when doing a fresh install, I like to add my frequently used projects
back to the list.
HACK
#14
Refactor Your Code Hack #14
Visual Studio 2005 puts this fundamental tenet of Extreme Programming into
action. Use it to write better code.
Refactoring is a technique for improving a section of code by modifying its
internal structure, but without affecting its external behavior. Refactoring is
one of the key tenets of Extreme Programming; in a rapid development
methodology, the idea is to create code quickly and then refactor it as you
work with it. The goal of Extreme Programming is to create better quality
code by concentrating on small deliverables and continuously testing and
refactoring your code. Refactoring is not just limited to Extreme Program-
ming—it is a valuable practice regardless of the methodology you happen to
subscribe to. Visual Studio 2005 introduces a new Refactor menu. This
menu is available whenever you right-click and provides a number of time-
saving and code-improving functions.
Refactoring is almost exclusively a C# feature. The only part
of the Refactor menu that is available in VB.NET is ...