Iterators VS enumerateors

Hi,

i have a small doubt difference between the Iterators and enumerators. Pls Help me.

Thanks,

samy

Hi,

this will help you the most:

http://sumitsaxfactor.wordpress.com/2011/05/05/iterators-vs-enumerators/

thanks,

Trishant

Hi,

i went through this url but still not clear. so pls some one give brief explanation.

Thanks

Iterators and Enumerators are 2 ways to iterate lists providing similar functionalities.

From class help. http://msdn.microsoft.com/en-us/library/listenumerator.aspx

“It is best practice to use the ListEnumerator class instead of the ListIterator class, because enumerators are automatically created on the same tier as the list (when the list.getEnumerator method is called). This avoids a potential problem in code that is marked as Called from, where the iterator and list can be on separate tiers. In addition, list enumerators require less code than list iterators and therefore perform slightly better. The only situation where you have to use a list iterator is if you want to delete items from a list (use the ListIterator.delete method).”