I am working on a simple windows forms application that the user enters a string with delimiters and I parse the string and only get the variables out of the string. So for example if the user enters:
2X + 5Y + z^3
I extract the values 2,5 and 3 from the "equation" and simply add them together.
This is how I get the integer values from a string.
int thirdValue
string temp;
temp = Regex.Match(variables[3], @"\d+").Value
thirdValue = int.Parse(temp);
variables
is just an array of strings I use to store strings after parsing.
However, I get the following error when I run the application:
Input string was not in a correct format