I\'m typing an equation into a TextBox that will generate the graph of the given parabola. Is it possible to use an eval function? I\'m using C# 2010 and it doesn\'t have Mi
Thank you so much Mr.Teoman Soygul
if you want to catch the error then you can use try catch,then we can use that values to future purpose.
try
{
DataTable table = new System.Data.DataTable();
table.Columns.Add("expression", string.Empty.GetType(), expression);
DataRow row = table.NewRow();
table.Rows.Add(row);
return double.Parse((string)row["expression"]);
}
catch (Exception)
{
return -1;
}