Skip to main content
  
Object.toString Method [AX 2012]

Returns a string that represents the current object.

Syntax
public str toString()

Run On

Called

Return Value

Type: str
A string that represents the current object.
Remarks

The default implementation returns the class name of the object. The method can be overridden in a derived class to return values that are meaningful for that type.

For example, an instance of the SysMethodInfo class returns the method name and type of the method, such as instance or static.

Examples

The following example prints out the class name of o.

static void Object_ToString_Job(Args _args) 
{ 
    Object o = new Object(); 
 
    print o.toString();  // Prints out: "Class Object" 
    pause; 
}