Convert numbers with exponential notation from string to double or decimal
问题 Is there a fast way to convert numbers with exponential notation (examples: "0.5e10" or "-5e20") to decimal or double? Update: I found Parse a Number from Exponential Notation but the examples won't work for me unless I specified a culture. Solution: double test = double.Parse("1.50E-15", CultureInfo.InvariantCulture); 回答1: If your culture uses . as the decimal separator, just double.Parse("1.50E-15") should work. If your culture uses something else (e.g. , ) or you want to make sure your