138Microsoft Visual Studio 2010: A Beginner’s Guide

Class Details window provides additional details on the members of the Program.cs class. Figure 5-13 is a minimal diagram of one class with a single method, Main, and you would have seen all of the classes in the current project if there were more. This could be a good way to help you learn about an existing base of code.

In addition to code visualization, you have the ability to perform some light design with the Class Designer, as discussed in the next section.

Class Designer Code Generation

The Class Designer allows you to generate code graphically. On the left-hand side of Figure 5-13, you’ll see a tab for the Toolbox. Hovering over that tab, you’ll see a group of images for code items, such as Class, Enum, Inheritance, and more. Figure 5-14 shows the results of using Toolbox items to enhance the existing Figure 5-14 diagram.

In Figure 5-14, you can see the Toolbox with options for what type of items you can add to a class diagram. Each of the Toolbox items matches some type of code that you would normally write. The class diagram itself has additional items, including an abstract

Figure 5-14 Generating code with the Class Designer

Page 161
Image 161
Microsoft 9GD00001 manual Class Designer Code Generation, Generating code with the Class Designer