Generating Complex Objects
You can now generate new objects on-the-fly taking advantage of default solutions proposed by Visual Studio. You are not limited to generating previously described classes and members. Visual Studio enables you to generate the following types:
• Classes
• Structures
• Interfaces
• Delegates
• Enumerations
The following is instead the list of members that you can generate for the preceding types:
• Methods
• Properties
• Fields
You can generate objects on-the-fly by running the New Type dialog that you can activate choosing Generate Other solution instead of Generate Class. For example, imagine you want to generate a new structure on-the-fly. First, type the following line of code:
Dim threeDim As New ThreePoint
Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.