O'Reilly logo

Developer’s Guide to Collections in Microsoft® .NET by Calvin “Lee” Janes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. .NET Collection Interfaces

After completing this chapter, you will be able to

  • Add enumeration interfaces to classes.

  • Add collection interfaces to classes.

  • Add list interfaces to classes.

  • Add dictionary interfaces to classes.

Enumerators (IEnumerable and IEnumerator) Overview

As you saw in Chapter 1, through Chapter 3, collections come in all shapes and sizes. They all have different ways that they can be manipulated and accessed. The way that each collection type interacts with the world is what makes each unique and useful. However, they all have one thing in common: they contain a collection of items. Traversing a stack, however, is done differently from traversing a list or dictionary. Your implementation of traversing a list might be ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required