C# decimal.Parse() won't parse 1e-10

In C# code you can write something like
decimal d = 1e-10m;

However, decimal.Parse(“1e-10”) throws an exception: “System.FormatException: Input string was not in a correct format”. Not cool.

Leave a Reply

Your email address will not be published. Required fields are marked *