VB.NET
Arrays allow you to store a range of items of the same datatype. an array is a variable with a single name that represents many different items. When we work with a single item, we only need to use one variable. However, if we have a list of items which are of similar type to deal with, we need to declare an array of variables for each item.
An array can be one-dimensional or multidimensional. A one-dimensional array is like a list of items or a table that consists of one row of items or one column of items.
Names | |||
---|---|---|---|
Peter | Paul | James | Suzie |
index(0) | index(1) | index(2) | index(3) |
Declaring one dimensional Array
The general syntax to declare a one dimensional array is as follows:
Dim arrayName(subscript) as dataType