Structures

A structure is a user-defined type that can hold many values at the same time. Each value is known as a field and has a name. Structures can also have properties, methods, and events. And a structure can be an implementation of one or more traits.

You can put together data of different types in one structure. The elemets become related to the structure. Structures that you declare are data types that you can use to declare variables.

In this section

How to Declare a Structure
How to declare a structure and its elements.
Structure Variables
How to make a variable from a structure and get access to its elements.
Structures and Other Programming Constructs
The interactions between structures and arrays, objects, procedures, and other structures.
Structures and Classes
How structures compare to classes.