Summary
This chapter took a look at working with different
kind of collections. While arrays are fixed in size, you can use
lists for dynamically growing collections. For accessing elements
on a first in, first out basis, there’s a queue, and there’s a
stack for last in, first out operations. Linked lists allow for
fast inserting and removing of elements but are slow for searching.
With keys and values you can use dictionaries, which are fast for
searching and inserting elements.
In this chapter, you’ve seen a lot of interfaces
and their use for accessing and sorting collections. You’ve also
seen some specialized collections, such as BitArray and BitVector32,
which are optimized for working with a collection of bits.