private static double ParsePositiveValue(string v) { var value = double.Parse(v, NumberFormatInfo.InvariantInfo); if(value < 0) throw new FormatException("Expected a positive value instead of " + value); return value; }