25. August 2012 04:29
Collections(Array,List,Arraylist etc.) and traversing through collections are inevitable in software development. An iterator provides a means to loop through some items.The iterator tells the for each loop in what sequence you get the elements.The sequence of elements is given by the implementations of the IEnumerator interface.
The concept of iterators came from the famous Iterator pattern.