Hi All
One of the things I love the most about C# 2005 (and i think vb.net also does it, but J# doesnt) is the support for refactoring. Methods are available in the Microsoft IDEs where you can right click a variable name:
String MyStr <--right click this
And choose "rename" - you get a new window up, type your new name, and hit go. The IDE, i think, does a part compile of the code (because it warns if the project doesnt build, it might not refactor) and then replaces the variable wherever it is found..
More sophisticated than a simple find and replace because it is guaranteed to replace only that variable in all the contexts it is used. If anyone ever used MS Word and is familiar with the notion of the little marker that appears near the end of a word exposing a dropdown menu that performs actions (lightning bolt menu) such as word suggestion and replacement for badly spelled words, the MS IDEs also do this as a means to refactoring; rename the variable and you get a widget offering to rename it in all contexts it applies.
Other refactorings exist: Rename for method, class, file etc. Promoting a method local variable to being a class wide variable. Adding Get/Set pair and making a class level variable private (actually in MS it's properties, but same notion). Using a class as a template for an interface. Method parameter reordering and removal. Selecting a block of text to become a method in its own right.
Mostly I've found the renaming to be the most invaluable. I wouldnt miss the others so much if renaming at least were available
There's some great reformatting support to pretty print code too..
note of course that these are nice to haves.. I can sometimes paste my java code into VS C#, refactor it then paste it back, or use regular expression replacements in UltraEdit, but anyone who uses refactoring to clean up code and do lots of donkeywork will certainly agree it's a great feature
Support For Refactoring?
Started by
cjard
, Feb 25 2008 08:54 AM
2 replies to this topic
#1
Posted 25 February 2008 - 08:54 AM
#2
Posted 25 February 2008 - 09:23 PM
Ooh, that would be nice for big projects. Then that refactoring feature could be an intra-project change instead of just inside of a single file like the find-replace feature could only do. That would also make it easier for obfuscation, if one wanted to do such a thing
ham90mack
http://ham90mack.googlepages.com
Resistance may be futile,
But capacitance has potential.
BLAH!
http://ham90mack.googlepages.com
Resistance may be futile,
But capacitance has potential.
BLAH!
#3
Posted 29 July 2009 - 05:11 PM
I think that, too..........
PHP has much powerfull options to make a frontend and is quite faster then ASP...............
And I think that out there, there are much servers that having PHP compiled and would be using this E-Mail Server when there is a PHP frontend..........
_____________________________________
Website I designed for instant cash company.
PHP has much powerfull options to make a frontend and is quite faster then ASP...............
And I think that out there, there are much servers that having PHP compiled and would be using this E-Mail Server when there is a PHP frontend..........
_____________________________________
Website I designed for instant cash company.











