ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript.V8
V8ScriptEngine Class
V8ScriptEngine Methods
BeginCpuProfile Method
CancelAwaitDebugger Method
CancelInterrupt Method
CollectCpuProfileSample Method
CollectGarbage Method
Compile Method
CompileDocument Method
Dispose Method
EndCpuProfile Method
Evaluate Method
Execute Method
ExecuteCommand Method
GetRuntimeHeapInfo Method
GetStackTrace Method
Interrupt Method
WriteRuntimeHeapSnapshot Method

# V8ScriptEngineExecuteCommand Method

Executes script code as a command.
Namespace: Microsoft.ClearScript.V8
Assembly: ClearScript.V8 (in ClearScript.V8.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public override string ExecuteCommand(
    	string command
    )

    Public Overrides Function ExecuteCommand (
    	command As String
    ) As String

    public:
    virtual String^ ExecuteCommand(
    	String^ command
    ) override

    abstract ExecuteCommand :
            command : string -> string
    override ExecuteCommand :
            command : string -> string

#### Parameters

command String
  The script command to execute.

#### Return Value

String
The command output.

#### Implements

IScriptEngineExecuteCommand(String)
IScriptEngineExecuteCommand(String)
Remarks

This method is similar to Evaluate(String) but optimized for command consoles. The specified command must be limited to a single expression or statement. Script engines can override this method to customize command execution as well as the process of converting the result to a string for console output.

The V8ScriptEngine version of this method attempts to use toString to convert the return value.

See Also

#### Reference

V8ScriptEngine Class
Microsoft.ClearScript.V8 Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft