Doing math in vb.net like Eval in javascript

后端 未结 6 963

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:13

    I don't know about VB.net built in, but we do stuff like this by linking in the IronPython runtime and passing it the expressions. This is way way faster that using reflection.

提交回复
热议问题