private Decimal mk(decimal x, decimal y)
{
return x + y;
} private Decimal mk1(decimal x, decimal y)
{
return x * y;
} private void button1_Click(object sender, EventArgs e)
{
string lk = "mk(3, 2) * mk1(3, 2)";
// MSScriptControl.ScriptControl sc = new MSScriptControl.ScriptControl();
// sc.Language = "JavaScript";
// MessageBox.Show(sc.Eval("((2*3)-5+(3*4))+6/2").ToString());//1+12+3
DataTable dt = new DataTable();
MessageBox.Show(dt.Compute(lk,"").ToString() ); }
{
return x + y;
} private Decimal mk1(decimal x, decimal y)
{
return x * y;
} private void button1_Click(object sender, EventArgs e)
{
string lk = "mk(3, 2) * mk1(3, 2)";
// MSScriptControl.ScriptControl sc = new MSScriptControl.ScriptControl();
// sc.Language = "JavaScript";
// MessageBox.Show(sc.Eval("((2*3)-5+(3*4))+6/2").ToString());//1+12+3
DataTable dt = new DataTable();
MessageBox.Show(dt.Compute(lk,"").ToString() ); }
MessageBox.Show(dt.Compute(lk,"").ToString() );