Events
17 Mar, 9 pm - 21 Mar, 10 am
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
A structure is a generalization of the user-defined type (UDT) supported by previous versions of Visual Basic. In addition to fields, structures can expose properties, methods, and events. A structure can implement one or more interfaces, and you can declare individual access levels for each field.
You can combine data items of different types to create a structure. A structure associates one or more elements with each other and with the structure itself. When you declare a structure, it becomes a composite data type, and you can declare variables of that type.
Structures are useful when you want a single variable to hold several related pieces of information. For example, you might want to keep an employee's name, telephone extension, and salary together. You could use several variables for this information, or you could define a structure and use it for a single employee variable. The advantage of the structure becomes apparent when you have many employees and therefore many instances of the variable.
How to: Declare a Structure
Shows how to declare a structure and its elements.
Structure Variables
Covers assigning a structure to a variable and accessing its elements.
Structures and Other Programming Elements
Summarizes how structures interact with arrays, objects, procedures, and each other.
Structures and Classes
Describes the similarities and differences between structures and classes.
Data Types
Introduces the Visual Basic data types and describes how to use them.
Data Types
Lists the elementary data types supplied by Visual Basic.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
17 Mar, 9 pm - 21 Mar, 10 am
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Use data types and structs, arrays, slices, and maps in Go - Training
Learn about structs, arrays, slices, and maps. Understand the difference between them and when to use one type over the other.
Documentation
Structures and Other Programming Elements - Visual Basic
Learn more about: Structures and Other Programming Elements (Visual Basic)
Composite Data Types - Visual Basic
Learn more about: Composite Data Types (Visual Basic)
Structure Variables - Visual Basic
Learn more about: Structure Variables (Visual Basic)