You saw in Chapter 10 that arrays are useful for when you have a group of objects of the same type, and you need to treat them as a groupas a collection . Arrays are the least flexible of the five standard collections used in C# 2005:
This chapter will introduce each of the latter four collections, and will show how the new feature generics are used to make these collections type-safe (and why type-safety is important!). You can also create classes that act like collections, and you can provide support for your collection classes so that they support some or all of the behavior expected of collections like the ability to be used in a foreach loop or to access their members using an indexer: Employee joe = MyCompany[EmployeeID] |