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 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.