How to evaluate expression. Maybe like:
int a=1; i
You can take code, and using the CSharpCodeProvider write an Eval function that actually compiles your code into an in-memory assembly and then executes that code.
See this CodeProject article for sample source.