IEvaluatorCompileCode Method |
Namespace: CSScriptLib
Assembly CompileCode( string scriptText, CompileInfo info = null )
Assembly asm = CSScript.Evaluator
.CompileCode(@"using System;
public class Script
{
public int Sum(int a, int b)
{
return a+b;
}
}");
dynamic script = asm.CreateObject("*");
var result = script.Sum(7, 3);