Are there any .NET libraries out there that will parse a string as a formula?
ie; "if the user inputs "(2 +5) * 2", the library will be able to work out the calculation?
Edit:Preferably something that will work with Windows Phone 7 without too much fiddling would be nice!
NCalc is a fairly nice library that will parse mathematical expressions in .NET code.
Edit - New location on Github.
I posted source code for one that supports expressions, variables and functions.
You can see it at http://www.blackbeltcoder.com/Articles/algorithms/a-c-expression-evaluator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With