Chapter 18
Using collections
After completing this chapter, you will be able to:
Explain the functionality provided in the different collection classes available with .NET and understand how to use them.
Use collection initializers to populate collections.
Search through collections to find matching data.
Understand the differences between collections and arrays.
Chapter 10, “Using arrays,” introduced arrays for holding sets of data. Arrays are very useful in this respect, but they have their drawbacks. Arrays provide only limited functionality; for example, it’s not easy to increase or reduce the size of an array, and neither is it a simple matter to sort the data held in an array. Also, arrays only really provide a single means of accessing ...
Get Microsoft Visual C# Step by Step, 10th 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.