Mono.CSharp.Evaluator Class
Evaluator: provides an API to evaluate C# statements and expressions dynamically.

See Also: Evaluator Members

Syntax

public class Evaluator

Remarks

This class exposes static methods to execute C# statements and evaluate C# expressions in the current program. Expressions and statements should be fully formed, so they need to end with a semicolon as they would in a regular C# file.

To initialize the evaluator with a number of compiler options call the Init(string[]args) method with a set of command line options that the compiler recognizes.

To interrupt execution of a statement, you can invoke the Evaluator.Interrupt method. This comes in handy if you want to implement a handler for Control-C for example.

Requirements

Namespace: Mono.CSharp
Assembly: Mono.CSharp (in Mono.CSharp.dll)
Assembly Versions: 2.1.0.0