ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
ScriptEngine Class
ScriptEngine Methods
AddCOMObject Method
AddCOMType Method
AddHostObject Method
AddHostType Method
AddHostTypes Method
AddRestrictedHostObject Method
CollectGarbage Method
Dispose Method
Evaluate Method
EvaluateDocument Method
Execute Method
ExecuteCommand Method
ExecuteDocument Method
Finalize Method
GetStackTrace Method
Interrupt Method
Invoke Method

# ScriptEngineInvoke Method

Invokes a global function or procedure.
Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public Object Invoke(
    	string funcName,
    	params Object[] args
    )

    Public Function Invoke (
    	funcName As String,
    	ParamArray args As Object()
    ) As Object

    public:
    virtual Object^ Invoke(
    	String^ funcName,
    	... array<Object^>^ args
    ) sealed

    abstract Invoke :
            funcName : string *
            args : Object[] -> Object
    override Invoke :
            funcName : string *
            args : Object[] -> Object

#### Parameters

funcName String
  The name of the global function or procedure to invoke.
args Object
  Optional invocation arguments.

#### Return Value

Object
The return value if a function was invoked, an undefined value otherwise.

#### Implements

IScriptEngineInvoke(String, Object)
See Also

#### Reference

ScriptEngine Class
Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft