Understanding Structures

Structures in .NET development are the way to create custom value types. You find a lot of similarities between classes and structures, although this section explains some important differences. Also, Visual Basic 2015 has some improvements from previous versions with regard to structures. You create structures using a Structure..End Structure block. The following code provides an example of a structure representing a fictitious order received by your company:

Public Structure Order    Public Property OrderID As Integer    Public Property OrderDate As Date    Public Property ShippedDate As Date    Public Property CustomerID As Integer    Public Property EmployeeID As Integer    End Structure ...

Get Visual Basic 2015 Unleashed now with O’Reilly online learning.

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