O'Reilly logo

Visual C#® 2012: How to Program, Fifth Edition by Harvey Deitel, Paul Deitel

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

21.4. Nongeneric Collections

The System.Collections namespace in the .NET Framework Class Library is the primary source for nongeneric collections. These classes provide standard implementations of many of the data structures discussed in Chapter 19 with collections that store references of type object. In this section, we demonstrate classes ArrayList, Stack and Hashtable.

21.4.1. Class ArrayList

In most programming languages, conventional arrays have a fixed size—they cannot be changed dynamically to conform to an app’s execution-time memory requirements. In some apps, this fixed-size limitation presents a problem. You must choose between using fixed-size arrays that are large enough to store the maximum number of elements the app may require ...

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