Well, you're basically looking for the C# equivalent of Javascript's eval()
function.
I recommend the library NCalc.
var result = new Expression("124+241/2*5").Evaluate()
Another calculating engine would be Jace.NET.
Dictionary<string, double> variables = new Dictionary<string, double>();
variables.Add("var1", 2.5);
variables.Add("var2", 3.4);
CalculationEngine engine = new CalculationEngine();
double result = engine.Calculate("var1*var2", variables);
There's also Dynamic Expresso.
var result = new Interpreter().Eval("124+241/2*5");
And you can use Roslyn's ScriptingEngine to evaluate:
Roslyn.Scripting.Session session = roslynEngine.CreateSession();
session.Execute("124+241/2*5");