HostFunctionsfunc Method (Int32, Object) |
Creates a delegate that invokes a script function and returns its result value.
Namespace:
Microsoft.ClearScript
Assembly:
ClearScript.Core (in ClearScript.Core.dll) Version: 7.3.1
Syntaxpublic 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
- Type: SystemInt32
The number of arguments to pass to the script function. - scriptFunc
- Type: SystemObject
The script function for which to create a delegate.
Return Value
Type:
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