Arrays

**Types of Arrays**
> An array is a lot like a CD rack.Like one of those rectangular boxes with slots to slide CDs in, each above another. There are two types of Visual Basic arrays fixed-size and dynamic. > > A fixed-size array most closely matches our CD rack anology. There is a limited number of slots you can slide CDs into. Pretend you have three CDs - one by Beethoven, another by Tom Waits, and a third by Ice Cube. To fit all of these in your rack, the rack must contain at least three slots. So you declare your CD rack as having three slots.
 * __Types of Arrays__**

Fixed-sized Arrays
When an upper bound is specified in the declaration, a Fixed-array is created. The upper limit should always be within the range of long data type. Declaring a fixed-array Dim numbers(5) As Integer

In the above illustration, numbers is the name of the array, and the number 6 included in the parentheses is the upper limit of the array. The above declaration creates an array with 6 elements, with index numbers running from 0 to 5.

If we want to specify the lower limit, then the parentheses should include both the lower and upper limit along with the To keyword. An example for this is given below. Dim numbers (1 To 6 ) As Integer

In the above statement, an array of 10 elements is declared but with indexes running from 1 to 6. A public array can be declared using the keyword Public instead of Dim as shown below.

Public numbers(5) As Integer