I am trying to convert a string(format "1.1" or "11.11" and so on..) to a decimal. But the output keeps missing the "." or ","
So I enter "1.1 + 2.2".
first = 1.1 (string)
second = 2.2 (string)
When I try to convert to decimal I get "11" and "22".
Same result if I don't convert "." to ",".
None of the solutions i found on stackoverflow worked.
if (first.Contains("."))
{
DecimalMethod(first);
MessageBox.Show(first);
first.Replace(".", ",");
}
if (second.Contains("."))
{
DecimalMethod(second);
MessageBox.Show(second);
second.Replace(".", ",");
}
decimal.TryParse(first, out firstNumber);
decimal.TryParse(second, out secondNumber);