The Class Builder
Applies to: Visual Studio .NET 2002, Visual Studio .NET 2003, Visual Studio 2005, Visual Studio 2008
The Class Builder can be used to insert new class templates.
To insert a new class in Visual Basic:
-
Open the Visual Basic code module where you want the class to be inserted.
-
Click Insert New Class on the Code Edit Tools toolbar to display the
Insert New Class dialog-box (quick toolbar
and menu references are available).
-
Specify the name of the new class in the corresponding text box.
-
Optionally, you may specify the base class from which the new class will inherit.
-
Set the class scope. If you want to use the implicit public scope select
the Do not specify option.
-
You may also specify the access modifier for the new class. Select None
if the class should not have an access modifier.
-
Specify if the new class should be marked as 'partial'
-
Generate XML comments: check this option if you want for XML descriptive comments to be generated.
-
You can enclose generated code between #Region
and #End Region directives
by checking the corresponding option.
-
Press the Standards button in order to review the naming standards configuration (this will be considered when generating code).
-
Click Insert/New if you want to generate and insert the new class and continue with another one. Use Insert to simply close the dialog after
the new class is generated and inserted in code.
To insert a new class in C#:
-
Open the C# code module where you want the class to be inserted.
-
Click Insert New Class on the Code Edit Tools toolbar to display the
Insert New Class dialog-box (quick toolbar
and menu references are available).
-
Specify the name of the new class in the corresponding text box.
-
Optionally, you may specify the base class from which the new class inherits.
-
Set the class scope. If you want to use the implicit public scope select
the Do not specify option.
-
You may also specify the access modifier for the new class. Select None
if the class should not have an access modifier.
- Specify if the new class should be marked as 'partial'.
-
Generate XML comments: check this option if you want for XML descriptive comments to be generated.
-
You can enclose generated code between #region
and #endregion directives
by checking the corresponding option.
- Press the Standards button in order to review the naming standards configuration (this will be considered when generating code).
-
Click Insert/New if you want to generate and insert the new class and continue with another one. Use Insert to simply close the dialog after
the new class is generated and inserted in code.
Note
-
New classes can also be created by using the Insert New Class entry from the CodeSMART
Code Explorer context menu. This entry is available for namespace, module
(only Visual Basic) and class type nodes.
See Also
Back to top
|