Im trying to parse or convert the string "3045.00"
(three thousand forty-five) but it always returns 304500.0
(three hundred four thousand five hundred).
The ways that i tried to:
Convert.ToDecimal("3045.00")
Decimal.Parse("3045.00")
Someone could help me? Thanks.
CodePudding user response:
Providing the InvariantCulture
causes parsing to use the .
character as the thousands separator (instead of the decimal separator)
Console.WriteLine(decimal.Parse("3045.00", CultureInfo.InvariantCulture)); //"3045.00"