Click or drag to resize

IsClassOf Function

X#
Determine if one class is a subclass of another class.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION IsClassOf(
	symClassName AS STRING,
	symSuperClassName AS STRING
) AS LOGIC
Request Example View Source

Parameters

symClassName
Type: String
The symbol of the class to examine.
symSuperClassName
Type: String
The symbol of the superclass to examine.

Return Value

Type: Logic
TRUE if symClassName inherits from symSuperClassName; otherwise, FALSE.
Remarks
Examples
The following example shows the result of IsClassOf() when queried:
X#
1CLASS A
2CLASS B INHERIT A
3CLASS C
4FUNCTION CheckClasses()
5? IsClassOf(#B, #A)      // TRUE
6? IsClassOf(#B, #C)      // FALSE
7? IsClassOf(#C, #A)      // FALSE
See Also

Reference

IsClassOf(String, String)