Chapter 4. Arrays and Enumerations

In addition to the fundamental types such as Integer or Double, there are two other simple types that programmers can use in their programs: arrays and enumerations. Arrays are useful for storing multiple values of a type, while enumerations are useful for giving friendly names to numeric values.

Arrays

An array is a type that contains a set of variables of the same type that are accessed by position rather than by name. The individual variables in the array are called the elements of the array; the type of the variables is called the element type of the array. A variable at a particular position in an array is referenced by number, which is called the index of the element. For example, the following code creates ...

Get Visual Basic .NET Programming Language, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.