I\'m typing an equation into a TextBox that will generate the graph of the given parabola. Is it possible to use an eval function? I\'m using C# 2010 and it doesn\'t have Mi
I created the ExpressionEvaluatorCs Nuget package inspired by mar.k's answer and also added the option to specify return type.
Sample code
// Returns object 6 object result1 = ExpressionEvaluator.Evaluate("(1 + 2) * 2"); // Returns int 6 int result1 = ExpressionEvaluator.Evaluate("(1 + 2) * 2");