Mono.CSharp.Evaluator.Compile Method
Compiles the input string and returns a delegate that represents the compiled code.

Syntax

public static CompiledMethod Compile (string input)

Parameters

input
The expression or statement to compile.

Returns

Remarks

Compiles the input string as a C# expression or statement.

Unlike the Evaluate method, the resulting delegate can be invoked multiple times without incurring in the compilation overhead.

This method can only deal with fully formed input strings and does not provide a completion mechanism. If you must deal with partial input (for example for interactive use) use the other overload.

On success, a delegate is returned that can be used to invoke the method.

Requirements

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