Hello guys......
I am confuse in what is the difference between Enumerator and Enumerable?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sumit JoshiPosted Oct 1, 2015, 3:17 PM
IEnumerableinterface should implement a methodGetEnumeratorwhich returns a type that implements theIEnumeratorinterface. Then having an enumerator you can use theforeachstatement, which in its essence implements theiteratorpattern, to traverse the elements of a collection of your custom type.Sujeet SumanPosted Oct 1, 2015, 12:22 PM