Enumerators and Iterators

Daniel M. Solis · Apress eBooks · 2010

In Chapter 14, you saw that you can use a foreach statement to cycle through the elements of an array. In this chapter, you’ll take a closer look at arrays and see why they can be processed by foreach statements. You’ll also look at how you can add this capability to your own user-defined classes. Later in the chapter, I’ll explain the use of iterators.

Read the paper · More papers on PaperTik