Difference between Enumerator and Iterator(use for list, Maps or Sets element’s traversing)
- We can traverse our List, Map or Set collections by using either an enumerator or an iterator
- We can’t add/Delete elements in the List or Maps or Set using Enumerator class but we can do it via iterator class
- It is a best practice to use the Enumerator class instead of the Iterator class, because enumerators are automatically created on the same tier as the map (when calling the List.getEnumerator method)
- Enumerators require less code than iterators to initiate there instance, they perform slightly better.
For more information please refer to following link
Difference between Enumerator and Iterator in AX 2012