CHAPTER 10
Using arrays
After completing this chapter, you will be able to:
Declare array variables.
Populate an array with a set of data items.
Access the data items held in an array.
Iterate through the data items in an array.
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 some further questions: How many variables do you need? How should you name them? If you need to perform the same operation on each ...
Get Microsoft Visual C# Step by Step, 9th 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.