MapEnumerator.toString Method [AX 2012]
Returns a string that represents the current object.
The following example creates a map, and then prints the content of the first and second elements in the map.
{
Map myMap = new Map(Types::Integer, Types::String);
MapEnumerator enumerator;
int i;
// Add some elements to the map
myMap.insert(1, "Element one");
myMap.insert(2, "Element two");
myMap.insert(3, "Element three");
myMap.insert(4, "Element Four");
// Set the enumerator
enumerator = myMap.getEnumerator();
// Go to beginning of enumerator
enumerator.reset();
// Go to the first element in the map
enumerator.moveNext();
// Print first item in the map
print enumerator.toString();
// go to second element
enumerator.moveNext();
// Print second element in map
print enumerator.toString();
pause;
}
Community Additions
ADD
Show: