Debugger3::ExecuteStatement Method (String^, Int32, Boolean)
Executes the specified statement. If the TreatAsExpression flag is true, then the string is interpreted as an expression, and output is sent to the Command Window.
Assembly: EnvDTE90 (in EnvDTE90.dll)
void ExecuteStatement( String^ Statement, int Timeout = -1, bool TreatAsExpression = false )
Parameters
- Statement
-
Type:
System::String^
The statement to execute.
- Timeout
-
Type:
System::Int32
The timeout period, in milliseconds.
- TreatAsExpression
-
Type:
System::Boolean
true if the string is to be interpreted as an expression; otherwise false.
ExecuteStatement executes the specified statement. A statement differs from an expression in that a statement can consist of one or more expressions. Therefore, typically no value can be associated or returned by statement execution.
Some languages, such as Visual Basic, support a language syntax that relies on the context in which a statement appears to indicate how the statement is evaluated. For example, if your Visual Basic code has statement, a = 1, it is interpreted as an expression if the code appears inside an If…Then statement. It is interpreted as a statement if it appears alone on a line. The expression tests a against the value of 1, the statement will set a equal to 2. See the following example.
Output from this method is sent to the Command Window.