Summary


This chapter showed how the refactoring tools built into the C# editor for Visual Studio 2005 can greatly increase productivity and decrease unwanted side effects (bugs) when you're making sweeping changes to your code to improve maintenance, reuse, and readability. The refactoring tools use the compiler and not text searching. This improves confidence in and reliability of the tools.

These tools can be accessed using the keyboard, the Refactor menu, a context menu, or the Class Designer. Actual refactoring operation access, of course, depends on code selection context.

The refactoring tools allow you to change your code in many ways. You can easily rename items in your code. You can take existing lines of code and extract them to new methods. Your objects can be used as the basis to define new interfaces. Method signatures can be modified using the Remove, Promote Local Variable, and Reorder refactoring operations. Finally, you can take existing fields and quickly encapsulate them into properties.




Microsoft Visual Studio 2005 Unleashed
Microsoft Visual Studio 2005 Unleashed
ISBN: 0672328194
EAN: 2147483647
Year: 2006
Pages: 195

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net