paint-brush
How to Use the Iterator Pattern in C#by@ssukhpinder
428 reads
428 reads

How to Use the Iterator Pattern in C#

by Sukhpinder Singh4mJune 8th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

An example of a collection list of cars and an array of motorcycles is an example of the use case. According to Gang of Four, the iterator pattern provides a process to obtain the aggregator object without knowing its implementation. The article demonstrates the usage of the design pattern using the C# programming language. The PrintVehicles methods check if!iterator.isDone then output the collection element. The printVehicles method check if.receive!iterator is done, and output the. element.

Company Mentioned

Mention Thumbnail
featured image - How to Use the Iterator Pattern in C#
Sukhpinder Singh HackerNoon profile picture
Sukhpinder Singh

Sukhpinder Singh

@ssukhpinder

Programmer by heart | C# | Python | .Net Core | Xamarin | Angular | AWS

Learn More
LEARN MORE ABOUT @SSUKHPINDER'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Sukhpinder Singh HackerNoon profile picture
Sukhpinder Singh@ssukhpinder
Programmer by heart | C# | Python | .Net Core | Xamarin | Angular | AWS

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite