Page 1 of 1
Method : [StringToNumber] Input string was not in a correct format.
Posted: Sat Nov 14, 2009 5:13 am
by magic1362
What means this error?
Method : [StringToNumber]
Input string was not in a correct format.
Expression for text that has error is:
{SumD(System.Math.Round(double.Parse (Table.QUANTITY))).ToString ()}
Method : [StringToNumber] Input string was not in a correct format.
Posted: Mon Nov 16, 2009 2:55 pm
by Edward
Hi
Please check the string which you passed in to the double.Parse() method. It could contain not printed symbols or different from your system locale signs for double values e.g. dot instead of comma or vice versa.
Thank you.
Method : [StringToNumber] Input string was not in a correct format.
Posted: Tue Nov 17, 2009 1:59 am
by magic1362
double.Parse() method works fine, but when i use Sum () or Sumd () method this error occur.
Method : [StringToNumber] Input string was not in a correct format.
Posted: Tue Nov 17, 2009 3:35 am
by Edward
Hi,
We do not have any method named "StringToNumber", but this method exists in a double.Parse method. And in that method error occurs:
internal static unsafe double ParseDouble(string value, NumberStyles options, NumberFormatInfo numfmt)
{
byte* stackBuffer = stackalloc byte[1 * 0x72];
NumberBuffer number = new NumberBuffer(stackBuffer);
double num = 0.0;
StringToNumber(value, options, ref number, numfmt, false);
if (!NumberBufferToDouble(number.PackForNative(), ref num))
{
throw new OverflowException(Environment.GetResourceString("Overflow_Double"));
}
return num;
}
Thank you.