Skip to Content
Microsoft® Visual C#® 2012 Step by Step
book

Microsoft® Visual C#® 2012 Step by Step

by John Sharp
December 2012
Beginner to intermediate content levelBeginner to intermediate
844 pages
25h 38m
English
Microsoft Press
Content preview from Microsoft® Visual C#® 2012 Step by Step

Chapter 19. Enumerating Collections

After completing this chapter, you will be able to

  • Manually define an enumerator that can be used to iterate over the elements in a collection.

  • Implement an enumerator automatically by creating an iterator.

  • Provide additional iterators that can step through the elements of a collection in different sequences.

In Chapter 10, and Chapter 18, you learned about arrays and collection classes for holding sequences or sets of data. Chapter 10 also introduced the foreach statement that you can use for stepping through, or iterating over, the elements in a collection. In these chapters, you used the foreach statement as a quick and convenient way of accessing the contents of an array or collection, but now it is time to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® Visual C#® 2008 Step by Step

Microsoft® Visual C#® 2008 Step by Step

John Sharp
Beginning Microsoft® Visual C#® 2008

Beginning Microsoft® Visual C#® 2008

Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, Eric White

Publisher Resources

ISBN: 9780735679375Purchase book