Chapter 10. Arrays

Almost all of the examples in previous chapters have dealt with one object at a time. In many applications, however, you want to work with a collection of objects all at the same time. The simplest collection in C# is the array, and it’s the only collection type for which C# provides built-in support. The other collection types, such as stack and queue, are not part of the language; they are part of the Framework Class Library, and we’ll cover those in detail in Chapter 14. The cool thing about arrays is that you can pass them around as though they were a single object, yet they contain several objects of the same type. Arrays really come into their own in combination with loops, which you learned about back in Chapter 5. In this chapter, you will learn to work with three types of arrays: one-dimensional arrays, multidimensional rectangular arrays, and jagged arrays.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset