26. Collections

The shapes a bright container can contain!

Theodore Roethke

Not by age but by capacity is wisdom acquired.

Titus Maccius Plautus

It is a riddle wrapped in a mystery inside an enigma.

Winston Churchill

I think this is the most extraordinary collection of talent, of human knowledge, that has ever been gathered together at the White House—with the possible exception of when Thomas Jefferson dined alone.

John F. Kennedy

Objectives

In this chapter you will learn:

• The non-generic and generic collections that are provided by the .NET Framework.

• To use class Array’s static methods to manipulate arrays.

• To use enumerators to “walk through” a collection.

• To use the foreach statement with the .NET collections.

• To ...

Get C# for Programmers, Second 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.