I tried to use the decimal.parse as described at : http://msdn.microsoft.com/en-us/library/cafs243z(v=vs.110).aspx
So i copied from this page the following example:
string value;
decimal number;
value = "1.62345e-02";
try
{
number = Decimal.Parse(value);
Console.WriteLine("'{0}' converted to {1}.", value, number);
}
catch (FormatException)
{
Console.WriteLine("Unable to parse '{0}'.", value);
}
And i got a FormatException, Do you have an idea why it's happened?
thanks, eyal
Decimal.Parse
doesn't handle e notation by default - the documentation you copied this from even tells you this won't work. – Chrystalchryste