O'Reilly logo

Microsoft® Visual C#® 2008 Step by Step by John Sharp

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

What Are Collection Classes?

Arrays are useful, but they have their limitations. Fortunately, arrays are only one way to collect elements of the same type. The Microsoft .NET Framework provides several classes that also collect elements together in other specialized ways. These are the collection classes, and they live in the System.Collections namespace and sub-namespaces.

The basic collection classes accept, hold, and return their elements as objects—that is, the element type of a collection class is an object. To understand the implications of this, it is helpful to contrast an array of int variables (int is a value type) with an array of objects (object is a reference type). Because int is a value type, an array of int variables holds its ...

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