C# IEnumerator nerelerde kullanılıyor A Gizli Silah
The power here is that it naturally allows us to express more complex iterations, like through dictionaries or trees using the same interface.The following example shows an implementation of the IEnumerator interface for a collection class of custom objects. The custom object is an instance of the type Box, and the collection class is BoxCollection