I have a textbox where i want to read user-input mathematical functions( ex: Math.Sqrt(x) etc).
The code I've been using for console testing the function is
static double f(double x)
{
double f;
f = Math.Sqrt(x);
return f;
}
I'm not sure how to modify it: do I read the textbox contents in a string, and add that string as a second argument to the f function ( static double f(double x, string s)? what type of parsing should I apply to the string?