C# implements iterator pattern
The iterator pattern is a common design pattern that allows us to access elements in a collection by traversing the collection. In the C# language, we can use the IEnumerable interface and the IEnumerator interface to implement the iterator pattern.
First define a Person class for storing personnel information:
public class Person
{
public string Name {
get; set; }
public int Age {
g