Share via


ListEnumerator.definitionString Method

Returns a description of the enumerator.

Syntax

public str definitionString()

Run On

Called

Return Value

Type: str
A string that contains a description of the enumerator.

Remarks

For example, an enumerator for a list of integers would return int list enumerator.

Examples

The following example creates a list and an enumerator for the list. It uses the definitionString method to print a description of the enumerator.

{ 
    List list = new List(Types::Integer); 
    ListEnumerator  enumerator; 
    ; 
 
  
    // Add some elements to the list 
    list.addEnd(1); 
    list.addEnd(2); 
    list.addStart(3); 
  
 
    // Set the enumerator 
    enumerator = list.getEnumerator(); 
  
    print enumerator.definitionString(); 
    pause; 
}

See Also

ListEnumerator Class

ListEnumerator.toString Method