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());