using System.Globalization; private static double GetDouble(string s, double def = 0.0) { if (double.TryParse(s, NumberStyles.Float, CultureInfo.InvariantCulture, out var result)) return result; return def; }
672500cookie-checkC# Parse double from string