How to evaluate the expression. Maybe like:
int a=1; int b=3; int c=Eval("a+b");
or
int c=int.parse("1+3*(2+3)");
That seems silly to me. is this possible in c #?
You can take the code, and using CSharpCodeProvider, write an Eval function that actually compiles your code into an assembly in memory and then executes that code.
See the CodeProject article for an example source.
Not directly. C # does not contain a runtime compiler. There is an open source project attached to Mono that will do this.