hljs.configure({cssSelector: "code"}); hljs.highlightAll();

Monday, August 17, 2020

Difference Between Enumerator and Iterator In AX 2012

 Difference Between Enumerator and Iterator:

  • * 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 their instance, they perform slightly better. 


  • * The iterator does not support cross-tier referencing. 

No comments:

Post a Comment