I can't understand this error:
In this call to method SetVolume, Volume = 2055786000 and size = 93552000. Volume is an Integer property, and size is also Integer, as you can see.
The class is a partial class of a dbml entity class, however this Volume property is NOT a column in the database, it exist only in the partial class, as a "business object property".
View Detail shows:
Data > Item : In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user.
What may cause this...?
2055786000 + 93552000 = 2149338000, which is greater than 2^31. So if you're using signed integers coded on 4 bytes, the result of the operation doesn't fit and you get an overflow exception.
Maximum value fo int is 2147483647, so 2055786000+93552000 > 2147483647 and it caused overflow
So you cannot store this number into an integer. You could use Int64 type which has a maximum value of
9,223,372,036,854,775,807
.This error occurred for me when a value was returned as -1.#IND due to a division by zero. More info on IEEE floating-point exceptions in C++ here on SO and by John Cook
For the one who has downvoted this answer (and did not specify why), the reason why this answer can be significant to some is that a division by zero will lead to an infinitely large number and thus a value that doesn't fit in an Int32 (or even Int64). So the error you receive will be the same (Arithmetic operation resulted in an overflow) but the reason is slightly different.
The maximum size for an int is 2147483647. You could use an Int64/Long which is far larger.
The result integer value is out of the range which an integer data type can hold.
Try using Int64