ListIterator.next Method [AX 2012]
Moves the iterator to the next element in the list.
The following example uses the ListIterator.next method to traverse a list as the value of each element is printed.
{
List il = new List(Types::Integer);
ListIterator it;
int i;
// Add some elements
for (i = 1; i <= 10; i++)
{
il.addEnd(i);
}
// Traverse the list
it = new ListIterator(il);
while (it.more())
{
print it.value();
// Move to the next element
it.next();
}
pause;
}
Community Additions
ADD
Show: