I have a source XML that uses a dot (\".\") as a decimal separator and I am parsing this on a system that uses a comma (\",\") as a decimal separator.
As a result,
Easy way to specify custom decimal separator:
var price = "122$00"; var nfi = new NumberFormatInfo { CurrencyDecimalSeparator = "$" }; var ok = decimal.TryParse(price, NumberStyles.Currency, nfi, out result);