Chapter 6. Collections of Objects
You learned about the process of creating objects based on class definitions, a process known as instantiation, in Chapter 3. When we're creating only a few objects or declaring a few value-type variables, it's fairly simple to declare individualized variables for these elements: Students s1, s2, s3, perhaps; or Professors profA, profB, profC. But, at other times, individualized variables are impractical.
Sometimes, there will be too many objects or value types, as when creating Course objects to represent the hundreds of courses in a university's course catalog.
Worse yet, we may not even know how many objects or values of a particular type there will be in advance. With our Student Registration System (SRS), ...
Get Beginning C# 2008 Objects: From Concept to Code 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.