Doing math in vb.net like Eval in javascript

后端 未结 6 973

Is there any way to parse a string in vb.net (like, built in methods), that can do math like Eval can? For example, 3+(7/3.5) as a string would return 2.

I am not as

6条回答
  •  鱼传尺愫
    2020-11-28 15:16

    This CodeProject article might do the trick:

    An expression evaluator written in VB.NET
    http://www.codeproject.com/KB/vb/expression_evaluator.aspx

    There is also this:
    http://www.dotnetspider.com/resources/2518-mathematical-expression-expression-evaluate-VB.aspx

提交回复
热议问题