[Mono-dev] Need PutVar method on Mono.CSharp.Evaluator
Marek Safar
marek.safar at gmail.com
Mon Aug 15 11:27:19 EDT 2011
Hello,
> Hi, I am new to Mono, but becoming a big fan quickly (more detail
> below regarding what I am doing with it). To get right to the point,
> however, I would appreciate advice on how to *programmatically* set
> the value of a variable that can be seen inside the Evaluator, e.g.,
>
> var temp = Evaluator.Evaluate("...");
> Evaluator.PutVar("x", temp); // so such method exists!
> Evaluator.Run("... x ...");
You can simply run C# statement which will do the assignment. Trivial
example can look like this
Evaluator.Run("x = whatever");
Marek
More information about the Mono-devel-list
mailing list