[Mono-dev] Mono.CSharp.Evaluator questions
Jordi Mas
jordimash at gmail.com
Thu Jun 10 15:33:10 EDT 2010
Hello,
I'm using Mono.CSharp.Evaluator and I have two questions. I'll
appreciate if you can help me on this ones.
1) You cannot do something like this:
str = "using System;";
str += "Console.WriteLine (\"Hello\");";
Evaluator.Run (str);
but this works:
str = "using System;";
Evaluator.Run (str);
str = "Console.WriteLine (\"Hello\");";
Evaluator.Run (str);
It seems that you have to evaluate the "using" separately. Is this a
known issue?
2) The method Evaluator.GetVars returns a string that is unnecessary
hard to parse.
For example:
Random random = new Random ();
var num = random.Next (5);
var rslt = num + 5;
Is translated into:
"System.Random random = System.Randomint num = 4int rslt = 9"
I will be good at least to separate the variables with a space or a
special separator character to make this more easy to parse for consumer
applications.
No need to say that returning the data in type, variable, value
separated somehow separated in an array will be even better.
Thanks in advance,
Jordi,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100610/80836db6/attachment.html
More information about the Mono-devel-list
mailing list