Search code examples
c#floating-pointscientific-notation

Convert from scientific notation string to float in C#


What's the proper way to convert from a scientific notation string such as "1.234567E-06" to a floating point variable using C#?


Solution

  • Double.Parse("1.234567E-06", System.Globalization.NumberStyles.Float);