private void InputAreaTextChangedEventHandler(object sender, TextChangedEventArgs e) { txtOutput.Clear(); try { string[] str = ((TextBox)sender).Text.Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries); foreach (string eachStr in str) { txtOutput.Text += Calculate.Eval(eachStr); txtOutput.Text += System.Environment.NewLine; } txtOutput.Text = txtOutput.Text.Replace("System.__ComObject", ""); } catch { } }
private double F(double txtQuadraticResultX) { return(double.Parse(Calculate.Eval(expression, txtVariable.Text, txtQuadraticResultX.ToString()))); }