Send Function | |
Invoke a method.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION Send(
oObject AS USUAL,
symMethod AS USUAL,
MethodArgList PARAMS USUAL[]
) AS USUAL
public static Usual Send(
Usual oObject,
Usual symMethod,
params Usual[] MethodArgList
)
Request Example
View SourceParameters
- oObject
- Type: Usual
The object whose method is invoked. - symMethod
- Type: Usual
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