Short answer is no, there's isn't a built in function in C# that would
evaluate a C# expression stored in a string.
Long answer is still no, but it can be done. You basically have two
choices: use classes in the System.Reflection.Emit namespace to
implement this functionality yourself, or write your own mini
interpreter to parse and execute the subset of the C# expression
languange that you are interested in. You might want to use the ANTLR
parser generator(
http://www,antlr.org/). I have used it once before,
and I found it to be quite impressive.
Be forewarned though, both options would constitute an act of
self-flagellation and loathing unlike any other. So, unless you
absolutely must have this functionality, or if you have some very
sinister sins that you want to repent, then don't do it!