I have a formula as string. How to evaluate it using vb.net?
eg. I have (10.2+30+10) as a string variable
how can i get a sum of this (evaluate this formula) as 50.2
Two ways that I know of
1. Use Regular Expressions. Francesco Balena has an example of this method in his book Programming Visual Basic .net, but I can't find a reference on the web
2. Use the Microsoft Scripting Control
This is much easier and there is an example I found - here you go
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.