C# Parse double from string

Date: 2022-09-12
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;
}
67250cookie-checkC# Parse double from string