Answer the question
In order to leave comments, you need to log in
What's the difference between IEnumerable and IEnumerator interfaces?
From my approximate knowledge, the IEnumerator interface provides access to different elements from a particular collection, and the IEnumerable interface provides access to a class object that implements IEnumerator.
When do you need to use these interfaces separately and does it make sense to use both at once?
Answer the question
In order to leave comments, you need to log in
The entity being run over must implement IEnumerable.
The entity that runs must implement IEnumerator (usually a nested, often privately declared class).
What you said, I unfortunately did not understand.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question