Possible Duplicate:
Is it possible to dynamically compile and execute C# code fragments?
Javascript being an interpreted language has the capability to evaluate expressions passed as strings as boolean expressions (for example) at runtime.
So, the boolean expression string
string expression = "(125 >= 50 && 125 < 150) || (95 >= 70 && 95 < 100)"
can simply be passed to the eval
function
result = eval (expression)
and the result will be a boolean. I want to do the same thing using C# with Mono for iOS. I looked up "equivalent of Javascript eval in C#" and all the results that showed up were using some form of on the fly compilation (some were using the Javascript eval function bundled into a DLL).
However, iOS does not allow on the fly compilation and requires all code to be precompiled. Given this situation, I want to know if there is an implementation of eval for C# that does not use on the fly compilation.
Note that I am only interested in boolean expressions like the above. Thanks.