Example of using the Iterator Pattern in C#. More...
Public Member Functions | |
void | Run () |
Executes the example for the Iterator Pattern in C#. | |
Example of using the Iterator Pattern in C#.
A custom container is instantiated (it already contains harcoded data to iterate over). The custom container can then deliver three iterators, each providing a different aspect of the hardcoded data.
The output shows the output from each iterator.
Definition at line 23 of file Iterator_Exercise.cs.
|
inline |
Executes the example for the Iterator Pattern in C#.
Definition at line 29 of file Iterator_Exercise.cs.
References IteratorContainer_Class.GetItems(), IteratorContainer_Class.GetKeys(), and IteratorContainer_Class.GetValues().
Referenced by Program.Run().