using System;
using System.Globalization;
publicclass Example
{
publicstaticvoid Main()
{
string value;
float number;
value = "-1.2345e6";
if (Single.TryParse(value, out number))
Console.WriteLine(number);
else
Console.WriteLine("Unable to parse '{0}'.", value);
}
}