Using Microsoft JScript
using Microsoft.JScript.Vsa;
public string CalculateFormula(string evaluationString)
{
Object result = null;
try
{
VsaEngine en = VsaEngine.CreateEngine();
result = Microsoft.JScript.Eval.JScriptEvaluate(evaluationString, en);
}
catch
{
//lblMsg.Text += "<br/> CalculateFormula() -" +ex.Message;
}
return result.ToString();
}
using Microsoft.JScript.Vsa;
public string CalculateFormula(string evaluationString)
{
Object result = null;
try
{
VsaEngine en = VsaEngine.CreateEngine();
result = Microsoft.JScript.Eval.JScriptEvaluate(evaluationString, en);
}
catch
{
//lblMsg.Text += "<br/> CalculateFormula() -" +ex.Message;
}
return result.ToString();
}
No comments:
Post a Comment