2005-05-29
| Table of Contents: |
| Rate This Article: | Add This Article To: |
( Page 2 of 2 )
Designing Applications
Another benefit of C# class diagrams is that they help you design code. The class diagram allows you to drag-and-drop types and associations onto a visual design surface. When you add a type to the design surface, Visual C# automatically creates the corresponding code for you. Additionally, you can add type members through a class details window.
Note: I use the term Class Designer to describe the process and tools used to design types visually, rather than reverse engineered as described in the previous section on Class Diagrams.
To use the class designer, drag and drop shapes from the toolbox onto an existing class diagram surface, or start a new diagram. To create a new class diagram, right-click the project in Solution Explorer where you want to add new types, select Add, New Item, and double-click Class Diagram in the Add New Item dialog.
This creates a blank surface for you to drag and drop new objects from the toolbox.
Toolbox Controls
The toolbox contains several objects you can drag and drop onto the design surface. The previous section on visualization showed what several of these objects look like. Objects that haven't been described yet include Enum, Abstract Class, Association, and Comment.
If you were to drag and drop an Enum object from the toolbox to the design surface, you would see a dialog box similar to Figure 5. You can specify the name of the type, access, and location where generated code will be placed. As expected, access includes internal and public, but also has an option called Default, which generates code without an access modifier.
Discuss Code Design and Visualization with Visual C# 2005 I must be missing something, where are the figures referred to in the... I am also missing the figures... >>> Post your comment now!
![]() |
|


