Export (0) Print
Expand All

Array.toString Method [AX 2012]

Returns a string that describes the contents of the array.

public str toString()

Run On

Called

Return Value

Type: str
A string that describes the contents of the array.

The following example creates an array of integers and adds some values to it. The toString method is used to print the values that the array holds.

{ 
    Array     myArray; 
  
    Set set1 = new Set(Types::Integer); 
    Set set2 = new Set(Types::Integer); 
    int i; 
 
  
    myArray = new Array(Types::Integer); 
  
    // Add some values to the array. 
    for (i = 1; i< 10; i++) 
    { 
        myArray.value(i, i*2); 
    } 
  
    // Print out the values in the array. 
    print myArray.toString(); 
    pause; 
}

Community Additions

ADD
Show:
© 2015 Microsoft