Defining Structures

Chapter 2 introduced the structure as the replacement for the Type construct. Types only supported the aggregation of data; the Structure construct is more closely related to the class construct than the Type construct.

Structures support fields, properties, events, and methods. This section will demonstrate how to define structures and how to implement each of the new capabilities of structures. The last subsection discusses features that are not supported in Structure constructs, which comprise the differences between structures and classes.

Use the Structure construct where you would have used a Type in VB6, keeping in mind all the additional capabilities afforded by the new construct.

Defining Fields and Properties

Fields ...

Get Visual Basic® .NET Unleashed now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.