SetEnumerator.toString Method [AX 2012]
Retrieves a description of the contents of the element in the set that the enumerator currently points to.
The following example creates a set of integers, and then prints the content of the first and second elements in the set.
{
Set mySet = new Set(Types::Integer);
SetEnumerator enumerator;
int i;
// Add some elements to the set.
for (i = 0; i < 10; i++)
{
mySet.add(i);
}
// Set the enumerator.
enumerator = mySet.getEnumerator();
// Go to the beginning of the enumerator.
enumerator.reset();
// Go to the first element in the set.
enumerator.moveNext();
// Print the first item in the set.
print enumerator.toString();
pause;
enumerator.moveNext();
// Print the second element in the set.
print enumerator.toString();
pause;
}
Community Additions
ADD
Show: