Implementing Object Construction and Destruction
Applies to: Visual Studio .NET 2002, Visual Studio .NET 2003, Visual Studio 2005, Visual Studio 2008
The Implement Object Construction and Destruction dialog can help you implement basic
constructors for the objects and the usual methods for disposing them.
To implement object construction and destruction:
-
Open the Visual Basic or C# code module containing the type you want
to implement construction and destruction code for and place the cursor
inside that type's code.
-
In the CodeSMART main menu, select the Implement Object Construction
and Destruction entry from the Code Builder Tools popup menu, Implement Advanced Code secondary popup, or choose
the Object Construction and Destruction entry from the Implement
toolbar popup (quick toolbar and menu
references are available).
The Implement Object Construction and Destruction dialog will be displayed:
-
If you choose to implement constructors, specify the number of constructors to be added
and specify if you want to call the base type's constructor.
Because after the code insertion all the generated constructors will basically be identical in terms of contained code,
you must make sure to provide different signatures for each of them.
-
Check Add a 'Finalize' method if you want to implement the Finalize
method.
-
Check Implement the IDisposable interface if you want to implement
the IDisposable.Dispose method.
-
Generate XML comments: check this option if you want XML descriptive comments to be generated for the newly inserted code.
-
You can enclose the 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 since this one will be considered when generating code.
-
Press Insert to generate and insert the desired code based on the above specified settings.
See Also
Back to top
|