Export (0) Print
Expand All

List.toString Method

Returns a description of the values in the list.


public str toString()

Called

A string that describes the values of the elements in the list.

To print a description of the type of the elements in the list, use the List.definitionString method.

The following example creates a list of integers. The toString method is used to print a description of the values in the list.

{
    // Create a list of integers
    List il = new List(Types::Integer);
    ;
 
    // Add some elements to the list
    il.addEnd(1);
    il.addEnd(2);
    il.addStart(3);
 
    // Print a description of the list
    print il.definitionString();
    print il.toString();
    pause;
}

Community Additions

ADD
Show:
© 2014 Microsoft