Map.ToString Method

Definition

Returns a description of the (key, value) pairs in the map.

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

Returns

A string that contains a description of the elements in the map.

Remarks

The following example creates a map, adds some elements to it, and then prints a description of these elements.

{ 
    Map myMap = new Map(Types::Integer, Types::String); 
    // Add some elements to the map 
    myMap.insert(1, "Element one"); 
    myMap.insert(2, "Element two"); 
    myMap.insert(3, "Element three"); 
    myMap.insert(4, "Element Four"); 
    print myMap.toString(); 
    pause; 
}

Applies to