ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
IScriptEngine Interface
IScriptEngine Methods
AddCOMObject Method
AddCOMType Method
AddHostObject Method
AddHostType Method
AddHostTypes Method
AddRestrictedHostObject Method
CollectGarbage Method
Evaluate Method
EvaluateDocument Method
Execute Method
ExecuteCommand Method
ExecuteDocument Method
GetStackTrace Method
Interrupt Method
Invoke Method

# IScriptEngineExecuteCommand Method

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

    string ExecuteCommand(
    	string command
    )

    Function ExecuteCommand (
    	command As String
    ) As String

    String^ ExecuteCommand(
    	String^ command
    )

    abstract ExecuteCommand :
            command : string -> string

#### Parameters

command String
  The script command to execute.

#### Return Value

String
The command output.
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.
See Also

#### Reference

IScriptEngine Interface
Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft