ListEnumerator.current Method

Retrieves the value that is pointed to by the enumerator.

Syntax

public anytype current()

Run On

Called

Return Value

Type: anytype
The value that is currently pointed to in the list. The type of the return value is determined by the type of the items in the list.

Examples

The following example iterates through the list and sets the dimensionTopic variable to the value of the current list element.

public DimensionTopic firstDimensionTopic() 
{ 
    DimensionTopic  dimensionTopic; 
    ListEnumerator  enumerator; 
  
    enumerator = this.getTopicsEnumerator(); 
  
    if (enumerator.moveNext()) 
    { 
        dimensionTopic = enumerator.current(); 
    } 
  
    return dimensionTopic; 
}

See Also

Reference

ListEnumerator Class