Share via


SetEnumerator.Definitionstring Method

Definition

Returns a description of the enumerator.

public:
 virtual System::String ^ Definitionstring();
public string Definitionstring ();
abstract member Definitionstring : unit -> string
override this.Definitionstring : unit -> string
Public Function Definitionstring () As String

Returns

A string that contains a description of the enumerator.

Implements

Remarks

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

The following example creates a set and an enumerator for the set. The definitionString method is used to print a description of the enumerator.

{ 
    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(); 
    print enumerator.definitionString(); 
    pause; 
}

Applies to