Skip to main content

Refactoring – Generate Method Stub

Refactoring is a disciplined technique of restructuring your existing body of code by altering its internal structure without changing its external behavior.

Generating a method stub is useful when you are programming along one line and realize that you will need to define another method to perform another function. Rather than interrupt yourself to write the new method now, create the stub where you will need to call the method and continue to write code. You can go back later and actually define the method for which you created the stub.

To have Visual Studio generate the Method stub for you, hover your mouse pointer over the Intellisense icon, then click the icon that appears. Select and click the Intellisense message as shown in the figure below.

Generating a Method Stub in Visual Studio Team System.
  • Better Web Publishing
    Publish and administer Web sites more easily with the powerful combination of ASP .NET 2.0 and Visual Studio 2005.
  • Clean Solution
    Now cleaning all those unwanted intermediate files out of your solution is a one-click operation.
  • Deployment Designer
    The Deployment Designer in Visual Studio 2005 Team Edition for Software Architects allows application designs to be validated for deployment within a particular datacenter, identifying possible issues before the deployment begins.
  • Load Testing - Results Repository
    Visual Studio 2005 Team Edition for Testers provides the ability to gather and store detailed information about how an application performs under different types of load.
  • Movie Collection Starter Kit
    Create a database program to organize your movie collection and learn about calling XML Web services in ASP .NET 2.0.