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.
Specifies the number of elements in a list.
Syntax
public int elements()
Run On
Called
Return Value
Type: int
The number of elements in the list.
Examples
The following example creates a list of integers and adds some elements to it. The elements method is used to test whether there are three elements in the list.
{
List il = new List(Types::Integer);
il.addStart(1);
il.addStart(2);
il.addStart(3);
if (il.elements() != 3)
{
print "Something is wrong...";
}
}