使用运行时从字符串计算公式 [英] Calculating a Formula from a String Using Runtime
问题描述
我希望运行时采用行式计算并获得一些空公式错误。
I want runtime in gried row wise calculation and getting some null formula error.
任何人都可以帮我如何使用scriptcontrol执行字符串执行
Anyone help me how to string equation Execute using scriptcontrol
见下面的代码
public ScriptControl HCalc;
public ScriptControl HCalc;
string equation ="(((* * 2)/ 12)/ 27)" ;;
string equation = "(((3000 * 2)/12)/27)";
this.HCalc.ExecuteStatement(" [R2Fml] =" + equation); / *这里执行时生成错误* /
this.HCalc.ExecuteStatement("[R2Fml]=" + equation ); /* here error generated on execute time */
RuntimeHelpers.GetObjectValue(this.HCalc.Eval(" [R2Fml]"))
RuntimeHelpers.GetObjectValue(this.HCalc.Eval("[R2Fml]"))
推荐答案
ScriptControl类是System.Web.UI和论坛类型帮助位于其中一个论坛中
ASP.Net论坛。
The ScriptControl class is System.Web.UI and the Forum for that type assistance is located in one of the Forums here ASP.Net Forums.
到目前为止,我从未听说过这门课。
I've never heard of this class till now.
这篇关于使用运行时从字符串计算公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!