Export (0) Print
Expand All

Object.toString Method [AX 2012]

Returns a string that represents the current object.

public str toString()

Run On

Called

Return Value

Type: str
A string that represents the current object.

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.

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; 
}

Community Additions

ADD
Show:
© 2014 Microsoft