reflection - How do you do dynamic script evaluation in C#? -


What is the status of dynamic code evaluation in C #? I am working for a very advanced feature of an app, I want users to enter a line of C # code, which boolean should be evaluated.

Something like this:

DateTime Now.text & gt; 12 & amp; nbsp; Amp; DateTime.NowHow & lt; 14

I want to develop this string dynamically and want to get the result as a boolean.

I tried Microsoft.JScript.Eval.JScriptEvaluate , and it worked, but it is technically disliked and works only with JavaScript (not ideal, But practical). In addition, I would like to be able to push the objects into the script engine so that they can be used in the evaluation.

Some resources I used to dynamically mention to gather assemblies, but I think that is higher than that. I want to deal with it.

Then, in C # What is the status of the script evaluation? Is it possible, or am I out of luck?

If you use DLE's ScriptEngine, here is an example:


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -