(new StringReader("
(string.Format("number({0})", new
System.Text.RegularExpressions.Regex(@"([\+\-\*])")
.Replace(TextBox1.Text, " ${1} ")
.Replace("/", " div ")
.Replace("%", " mod ")));
TextBox2.Text = D.ToString();
Note: Above will evaluate expression in Textbox1.Text
No comments:
Post a Comment