My error message is as listed in the header “Input string was not in a correct format” however the stack trace is even more cryptic
Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat) at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat)
This is worse due to the fact that nowhere in the project does it use “ParseDouble”. I believe that this has something to do with the objectfactorylibrary but can’t pin anything down.
Has anyone seen something similar or point me in a general direction?
Edit:
Additional information, this is a production only issue with local, dev, and QA unable to reproduce the error in any environment but Production.
The stack trace is referring to a method inside of the .NET Framework code, called
ParseDouble. It does not exist in your code. This is why the entire namespace is included, so that you can tell where the method is defined. If it starts withMicrosoftorSystem, it’s not something you wrote.You probably used the
CDbloperator (it’s that thing that looks like a function call to the uninitiated), and internally, the .NET Framework translated that to a call to theConversions.ToDoublemethod, which internally calls theConversions.ParseDoublemethod. These are implementation details that you should not have to be concerned with. Keep traveling up the stack trace until you find the last method called that is part of your code.As far as why your code is throwing that error, it’s almost impossible to say without seeing some code that reproduces it.
However, my psychic debugging powers tell me that you’re probably trying to parse a string value into a number, and the method is failing because the string does not contain a valid number. Check the value of the string you’re passing into the method and update your question. It’s probably an issue of the language settings on your computer. Do you use a language where
,(a comma) is the decimal separator rather than.(a period)?