![]() | IEvaluatorCompileMethod Method |
This method is a logical equivalent of CompileCode(String, CompileInfo) but is allows you to define your script class by specifying class method instead of whole class declaration.
Namespace: CSScriptLib
Assembly CompileMethod( string code )
dynamic script = CSScript.Evaluator .CompileMethod(@"int Sum(int a, int b) { return a+b; }") .CreateObject("*"); var result = script.Sum(7, 3);