CSend Function | |
Invoke a method.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION CSend(
oObject AS Object,
symMethod AS STRING,
MethodArgList PARAMS USUAL[]
) AS USUAL
public static Usual CSend(
Object oObject,
string symMethod,
params Usual[] MethodArgList
)
Request Example
View SourceParameters
- oObject
- Type: Object
The object whose method is invoked. - symMethod
- Type: String
The method name, specified without parentheses. - MethodArgList
- Type: Usual
A comma-separated list of arguments to pass to symMethod.
Return Value
Type:
Usual
The return value of the method.
Remarks
Send() allows you to send a method through a function call.
Examples
This example uses Send() to invoke a method named Horn() that expects two arguments:
1CLASS Automobile
2 EXPORT model
3CONSTRUCTOR(tmodel) CLASS Automobile
4 model := tmodel
5METHOD Horn(nSound, cSay) CLASS Automobile
6 Tone(nSound, 2)
7 QOut(cSay)
8FUNCTION Start()
9 LOCAL x AS OBJECT
10 x := Automobile{"Car"}
11
12 Send(x, #Horn, 100, "Hello!")
See Also