Set.definitionString Method

Definition

Returns a description of the type of the elements in the set.

public:
 System::String ^ definitionString();
public string definitionString ();
member this.definitionString : unit -> string
Public Function definitionString () As String

Returns

A string that contains a definition of the set.

Remarks

To print a list of the values within the set, use Set.toString.

The following example creates a set of integers. The definitionString method is used to print a description of the set.

{ 
    // Declare a set of integers 
    Set is = new Set (Types::Integer);  
    ; 
    // Add some integers to the set 
    print is.add(1); 
    print is.add(2); 
    print is.add(1); 
    // Print a description of the set 
    print is.definitionString(); 
    // Print a description of the set elements 
    print is.toString(); 
    pause; 
}

Applies to