Arrays are static in memory: once created, they can no longer be changed. But an object variable that points to a particular array type can be pointed to a different array of the same type, even one with a different number of elements. You can do this in one of several ways. The instant you define an array and specify the number of elements it will contain, the .NET Framework reserves the memory space for those elements, as shown in the following:
'Byte array with 11 elements (0-10) Dim myByteArray(10) As Byte
This statement establishes an array of the type Byte, and at the same time it reserves the memory space for 11 Byte elements.
In some cases, it might make sense to initially define an ...