Chapter 10. Using Arrays and Collections

After completing this chapter, you will be able to:

  • Declare, initialize, and use array variables.

  • Declare, initialize, and use variables of various collection types.

You have already seen how to create and use variables of many different types. However, all the examples of variables you have seen so far have one thing in common—they hold information about a single item (an int, a float, a Circle, a Date, and so on). What happens if you need to manipulate a set of items? One solution is to create a variable for each item in the set, but this leads to a number of further questions: How many variables do you need? How should you name them? If you need to perform the same operation on each item in the set (such ...

Get Microsoft® Visual C#® 2010 Step by Step now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.