Constructors and Default Instantiations of Value Types
Because no structure instances can exist without data, the CLR automatically creates a corresponding data instance when a structure is defined—regardless of whether New was used to instantiate the structure. The following example illustrates this point:
Dim AValue As NumberSystems Dim AReference As ReferenceType AValue.Value = 10 AReference.Value = 10
These lines execute with no problems until the last line, which triggers an exception because you are trying to change the property of an object that doesn’t exist on the Managed Heap, as illustrated in Figure 11-1.
Figure 11-1. Trying to change a ...