Click or drag to resize

HostFunctionsfunc(Int32, Object) Method

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.4.5
public Object func(
	int argCount,
	Object scriptFunc


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

A new delegate that invokes the specified script function and returns its result value.

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