HostFunctionsfunc(Int32, Object) Method |
Creates a delegate that invokes a script function and returns its result value.
Namespace: Microsoft.ClearScriptAssembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.5
Syntax public Object func(
int argCount,
Object scriptFunc
)
Public Function func (
argCount As Integer,
scriptFunc As Object
) As Object
public:
Object^ func(
int argCount,
Object^ scriptFunc
)
member func :
argCount : int *
scriptFunc : Object -> Object
Parameters
- argCount Int32
- The number of arguments to pass to the script function.
- scriptFunc Object
- The script function for which to create a delegate.
Return Value
ObjectA new delegate that invokes the specified script function and returns its result value.
Remarks
This function creates a delegate that accepts argCount arguments and
returns the result of invoking scriptFunc. The type of all
parameters and the return value is Object. Such a delegate is
often useful in strongly typed contexts because of
contravariance.
For information about the types of result values that script code can return, see
Evaluate(String, Boolean, String).
See Also