[Mono-dev] Mono.CSharp.Evaluator: x.GetType Bug?

Robert Jordan robertj at gmx.net
Fri Jan 25 17:58:08 UTC 2013

On 25.01.2013 18:33, lukebuehler wrote:
>      //this doesnt work
>      evaluator.Evaluate("var a = new A();", out result, out set);
>      //Error here:
>      evaluator.Evaluate("a.GetType();", out result, out set);
>      Console.WriteLine(result);

Local variables don't survive the evaluation. You must "Run()" them:

evaluator.Run("var a = new A();");


More information about the Mono-devel-list mailing list