I am trying to debug an application that receives an InvalidCastException. Fault line
decimal d = (decimal)row[denominator];
checking this in the debugger (see screenshot below), the line [denominator] has a double value, the value is 8.0, as far as I can tell. Awfully there shouldn't be any problems casting to decimal?
(The type "string" is from 3. party library , which is again populated with data from MySQL. The problem arose when testing on an older MySQL server, which, apparently, returns some aggregates like double vs decimal on MySQL 5.1 - the same query, exact copy of the data in the database)
Visual Studio Screenshot http://img18.imageshack.us/img18/3897/invaldicast.png
Any help on how I could continue this study?
Anonym
source share