using System.Globalization;
public static void Main()
Console.WriteLine("Hello World");
string stringAmount = "123,99.99";
stringAmount = stringAmount.Replace(" ", "").Replace(",", ".");
doubleAmount = double.Parse(stringAmount, NumberStyles.AllowCurrencySymbol |
NumberStyles.Number | NumberStyles.AllowThousands |
NumberStyles.AllowDecimalPoint);
Console.WriteLine(doubleAmount);
if (double.TryParse(stringAmount, out doubleAmount)) {
Console.WriteLine(doubleAmount);
Console.WriteLine("Can't parse");