CHAPTER 2 BUILDING C# (Web hosting services) APPLICATIONS 55 Integrated
CHAPTER 2 BUILDING C# APPLICATIONS 55 Integrated Support for Code Refactoring One major enhancement that ships with Visual Studio 2005 is intrinsic support to refactor existing code. Simply put, refactoring is a formal and mechanical process whereby you improve an existing code base. In the bad old days, refactoring typically involved a ton of manual labor. Luckily, Visual Studio 2005 does a great deal to automate the refactoring process. Using the Refactor menu, related keyboard shortcuts, smart tags, and/or context-sensitive mouse clicks, you can dramatically reshape your code with minimal fuss and bother. Table 2-4 defines some common refactorings recognized by Visual Studio 2005. Table 2-4. Visual Studio 2005 Refactorings Refactoring Technique Meaning in Life Extract Method Allows you to define a new method based on a selection of code statements Encapsulate Field Turns a public field into a private field encapsulated by a C# property Extract Interface Defines a new interface type based on a set of existing type members Reorder Parameters Provides a way to reorder member arguments Remove Parameters Removes a given argument from the current list of parameters (as you would expect) Rename Allows you to rename a code token (method name, field, local variable, and so on) throughout a project Promote Local Variable to Parameter Moves a local variable to the parameter set of the defining method Figure 2-21. The Visual Studio 2005 Object Browser utility
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.