Share via


DictEnum.values Method

Returns the number of items in the enumeration.

Syntax

public int values()

Run On

Called

Return Value

Type: int
The number of items in the enumeration.

Remarks

Because values must be unique, the number of values is the same as the number of items.

Examples

The following example shows how to retrieve the number of items in an enumeration and use that value in a loop.

DictEnum de; 
int      i; 
 
de = new DictEnum(enumName2Id("ActionType")); 
for (i=0; i < de.values(); i++) 
{ 
    print int2str(i) + ", " + de.index2Name(i); 
}

See Also

Reference

DictEnum Class