Hi,
Welcome to MSDN Newsgroup!
As far as I known, C# doesn't provide this function. If we want to evaluate
some code, we can use following two ways to achieve this goal. You could
choose one of them as you like,
1. Invoke Eval Function using JScript.NET. You could refer to the following
article,
Title: An Eval Function for C# using JScript.NET (JavaScript)
URL:
http://www.odetocode.com/Code/80.aspx
2. Implement Eval function from scratch using C#. I browse an article from
internet and hope it's helpful for you.
Title: Runtime C# Expression Evaluator
URL:
http://www.codeproject.com/csharp/runtime_eval.asp
I hope the above information is useful for you. If there is any question,
please feel free to join the community and we are here to support you at
your convenience. Thanks again and have a nice day.
Best Regards,
Terry Fei[MSFT]
Microsoft Community Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)