借用DataTable的Compute函数进行计算。
string formula = "1+1*4/3+23*(1+2)"; DataTable dt = new DataTable(); string really_data = dt.Compute(formula, "false").ToString();
借用DataTable的Compute函数进行计算。
string formula = "1+1*4/3+23*(1+2)"; DataTable dt = new DataTable(); string really_data = dt.Compute(formula, "false").ToString();
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。