ClassName Function |
Namespace: XSharp.RT
FUNCTION ClassName( oObject AS Object ) AS STRING
public static string ClassName( Object oObject )
1CLASS Person 2 EXPORT cName, cSign 3CONSTRUCTOR(tName, tSign) 4 cName := tName 5 cSign := tSign 6END CLASS 7CLASS Female INHERIT Person 8 EXPORT prefers 9END CLASS 10FUNCTION CheckClass() 11 LOCAL oY AS OBJECT 12 oY := Female{"Ms.", "Wonderful"} 13 IF ClassName(oY) = #Female 14 ? "The woman belongs to the Female class." 15 ENDIF