You are here: AxTools > CodeSMART 2009 for VS.NET > Documentation > User's Guide > Simple Code Builders > The Method Builder
While browsing this page, why not start downloading the evaluation setup kit (direct download, no questions asked).

The Method Builder
Applies to: Visual Studio .NET 2002, Visual Studio .NET 2003, Visual Studio 2005, Visual Studio 2008

The Method Builder can insert function (Visual Basic and C#) and sub (only Visual Basic) method templates.

To insert a sub or a function in Visual Basic:

  1. Open the Visual Basic code module and click inside the class or module where you want the new method to be inserted.
  2. Click Add New Method on the Code Edit Tools toolbar or select the same entry in the Code Builder Tools popup menu, Simple Code Builders secondary popup, to display the Add New Method dialog-box (quick toolbar and menu references are available).
  3. Specify the new method name in the corresponding text box.
  4. Select a return type if you want to create a function instead of a sub procedure.
  5. Optionally, you can specify member arguments.
  6. Set the method scope. If you want to use the implicit public scope then select Do not specify.
  7. Set the appropriate modifiers for the new method. Invalid modifiers are automatically disabled.
  8. Generate XML comments: check this option if you want for XML descriptive comments to be generated.
  9. Press the Standards button in order to review the naming standards configuration (this will be considered when generating code).
  10. Click Insert/New if you want to generate and insert the new method and continue with another one. Use Insert to simply close the dialog after the new method is generated and inserted in code.

To insert a function in C#:

  1. Open the C# code module and click inside the class where you want the new method to be inserted.
  2. Click Add New Method on the Code Edit Tools toolbar or select the same entry in the Code Builder Tools popup menu, Simple Code Builders secondary popup, to display the Add New Method dialog-box (quick toolbar and menu references are available).
  3. Specify the new method name in the corresponding text box.
  4. Select a standard type or specify a new return data type for the new function.
  5. Optionally, you can specify the method's arguments. You can also set these arguments after you have inserted the method template in the Code window.
  6. Set the method's scope. If you want to use the implicit public scope then select the Do not specify option.
  7. Set the appropriate modifiers for the new method. Invalid modifiers are automatically disabled.
  8. Generate XML comments: check this option if you want for XML descriptive comments to be generated.
  9. Press the Standards button in order to review the naming standards configuration (this will be considered when generating code).
  10. Click Insert/New if you want to generate and insert the new method and continue with another one. Use Insert to simply close the dialog after the new method is generated and inserted in code.

 Note

  • New methods can also be created by using the Add New method entry from the CodeSMART Code Explorer context menu. This entry is available for module (Visual Basic) and class type nodes only.
See Also
Simple Code Builders Overview
The Class Builder
The Property Builder
Switch Assignment Values

Back to top