public static String toExponential(Object thisob, Object fractionDigits)
{
double value = NumberPrototype.ThisobToDouble(thisob);
double f;
if (fractionDigits == null || fractionDigits is Missing)
{
f = 16;
}
else
{
f = Convert.ToInteger(fractionDigits);
}
if (f < 0 || f > 20)
{
throw new JScriptException(JSError.FractionOutOfRange);
}
StringBuilder fmt = new StringBuilder("#.");
for (int i = 0; i < f; i++)
{
fmt.Append('0');
}
fmt.Append("e+0");
return(value.ToString(fmt.ToString(), CultureInfo.InvariantCulture));
}