Object.toString Method

Returns a string that represents the current object.

public str toString()

Run On

Called

Return Value

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 (instance or static).

Example

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

See Also

Object Class