
.NET Programming Fundamentals • Chapter 5 191
NOTE
The memory size of an array is larger than just the memory needed to hold
the data. An array requires 20 bytes for the array, plus 4 bytes for each
dimension in the array plus the size of the data type for each element.
Dynamic Arrays
Once you have declared an array, you may need to change the size of it, which
Visual Basic allows you to do.This is accomplished using the Redim keyword.
When you declare an array, you don’t have to specify its size.You can just declare
it and the set its size later with the Redim keyword or you can redimension an
existing array. Let’s look at some examples:
Dim arr() As ...