O'Reilly logo

Application Development Using Visual Basic® and .NET by Dana L. Wyatt, Peter Thorsteinson, Robert J. Oberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Collections

The .NET Framework class library provides an extensive set of classes for working with collections of objects. These classes are all in the System.Collections namespace and implement a number of different kinds of collections, including lists, queues, stacks, arrays, and hashtables. The collections contain Object instance references. Since all types derive ultimately from Object, any built-in or user-defined type may be stored in a collection.

In this section we will look at a representative class in this namespace, ArrayList, and see how to use array lists in our programs.

ArrayList Example

To get our bearings, let's begin with a simple example of using the ArrayList class. An array list, as the name suggests, is a list of items ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required