C # parser calculation

Say I have a type string "(12.2*(5/7))", is there an API / method that can parse this, or will I need to write from scratch?

thank

+3
source share
3 answers

Yes, there is such a framework. Just google for the '.NET expression parser' and you will get many results!

+3
source

You need to write one or find a library to do this. There is nothing in .NET to support this as a standard.

, , , Excel ( , FlexCel) Excel . , excel. , , Excel .

0

See CodeProject.com article Implementing C # Programming Language Tools . Included samples include an arithmetic evaluator and JavaScript for the expression tree compiler. The combination of these features should provide you with what you want.

0
source

Source: https://habr.com/ru/post/1795468/


All Articles