For example in a console application I have the following code:
Console.Writeline("Enter function");
string function = Console.Readline();
and then function
gets defined as:
function = "ceil(5.0)";
then I would define the variable as a double. But what if the user would enter:
function = "ceil(5)";
How can I do a check if there is a double filled in or an integer so I now how to store that variable. And also if its the same but then with negative numbers, I already tried regex but maybe I didn't do it right. Any ideas?