Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
C# 中是否有任何方法可以传递数学语句,并且该方法会给你结果,例如你将传递这个字符串
1+2-3/4*5
它会给你回报
0
使用NCalc
Expression e = new Expression("2 + 3 * 5"); Debug.Assert(17 == e.Evaluate());