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 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.