MethodListClass Function | |
Create a class list in the form of an array for the specified class.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION MethodListClass(
symClass AS STRING
) AS ARRAY
public static Array MethodListClass(
string symClass
)
Request Example
View SourceParameters
- symClass
- Type: String
The class whose methods you want to list.
Return Value
Type:
Array
An array of symbols containing the name of all methods declared for
symClass.
Remarks
This function creates a list of all methods defined for the specified class.
The resulting method list array does not include ACCESS or ASSIGN methods.
Examples
This example uses MethodListClass() to store a method list for the Person class, then displays the resulting array. Note how the ACCESS method is ignored.
1FUNCTION Start()
2 AEval(MethodListClass(#Person),{|x| QOut(x)})
3
4
5
6CLASS Person
7 EXPORT name
8 INSTANCE grade
9 PROTECT password
10CONSTRUCTOR(tname, tgrade, tpassword)
11 name := tname
12 grade := tgrade
13 password := tpassword
14METHOD ShowGrade()
15 ? grade
16ACCESS Grade()
17 RETURN grade
18END CLASS
See Also Reference
MethodListClass(String)