Is there an javascript-like Evaluate() function in C# or any other similar method?
I have a simple mathematical expression (no brackets, only -, +, / and * operands) stored in a string and I want to be able to evaluate that and get the result in a float.
Example: For the input string "2+3-5*7" the output should be -30.
I tried to implement a method myself, but I have troubles converting a character to an int. It seems like I get the ASCII code of the character in my int instead of the value I want.