Feliz Navidad my
aficionados! I've just finished warming up my voice and am ready to
continue my aria of
Visual Studio 2008. Ready or not, here we go!
And a one, and a two, and a one, two, three, four!
"On the fourth day of X-mas my true love (DevExpress)
gave to me..."
Rename Works In Query Expressions
Today, instead of examining a brand new feature, we'll see how a pre-existing
refactoring handles the new features of C#
Visual Basic 9. Adding support for new language features involves much more
than simply creating a handful of new refactorings—all existing refactorings
must be updated as well. With
you can be confident that we've done our homework and provided support for
2008 across the entire product.
Of all the refactorings available to me, I use Rename the most frequently.
This is due to the fact that I use
to shape my code while I write it. Often, while coding a solution, I find that a
variable's meaning is no longer consistent with its name. When this happens,
Rename allows me to change the variable's name efficiently
and accurately. In fact, I've used Rename so often that I've grown to trust
Rename doesn't let me down when I'm working with a
C# 3.0 query expression. With the editor caret positioned on the identifier of the from clause, I
can press the Refactor key (CTRL+` on my machine), and Rename kicks in,
highlighting the active identifier and all its references.
At this point, I can just type the new variable name. All references are updated in real time.
View Screencast of Rename in Action!
Rename also works perfectly in an equivalent Visual Basic query expression
(using fancy Aggregate syntax). Again, it's as easy as pressing the Refactor
...and typing the new variable name.
The moral of today's verse is that Refactor! Pro offers deep support for
2008 in every refactoring. You can rest assured that all refactorings
just work as expected. And most importantly, they are working
this very minute. Not tomorrow. Not sometime in January.
Have a Merry X-mas!