Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Retrieves a description of the contents of the element in the set that the enumerator currently points to.
Syntax
public str toString()
Run On
Called
Return Value
Type: str
A string that contains a description of the current element in the set.
Examples
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;
}
See Also
SetEnumerator.toString Method