Click or drag to resize

ClassName Function

Get the class name of an object.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.08
Syntax
 FUNCTION ClassName(
	oObject AS Object
) AS STRING
View Source

Parameters

oObject
Type: Object
An object whose class name you want to get.

Return Value

Type: String
The class to which <oObject> belongs.  If <oObject> is not an instance of a class, a NULL_SYMBOL is returned.
Remarks
Examples
These examples illustrate ClassName():
X#
CLASS Person
        EXPORT cName, cSign
METHOD Init(tName, tSign) CLASS Person
        cName := tName
        cSign := tSign
CLASS Female INHERIT Person
        EXPORT prefers
FUNCTION CheckClass()
        LOCAL oY AS OBJECT
        oY := Female{"Ms.", "Wonderful"}
        IF ClassName(oY)        = #Female                                                        
                ? "The woman belongs to the Female class."
        ENDIF
See Also