7. Arrays

Now go, write it before them in a table, and note it in a book.

—Isaiah 30:8

With sobs and tears he sorted out Those of the largest size ...

—Lewis Carroll

Attempt the end, and never stand to doubt; Nothing’s so hard, but search will find it out.

—Robert Herrick

Begin at the beginning, ... and go on till you come to the end: then stop.

—Lewis Carroll

To go beyond is as wrong as to fall short

—Confucius

Objectives

In this chapter you’ll learn:

• How arrays are used to store, sort and search lists and tables of values.

• To declare, initialize and refer to elements of arrays.

• To pass arrays to methods.

• To use the For Each...Next statement to iterate through all the elements of an array.

• To use the elements of arrays as counters. ...

Get Visual Basic® 2012 How to Program, Sixth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.