In .NET what could overflow to yield the int ‘-2147479552’?
The exact InvalidOperationException is
System.InvalidOperationException: Value ‘0x-2147479552’ cannot be converted to System.Int64.
I am guessing that what followed 0x was a string that got cast to an int, but what could it have been?
No idea, it depends entirely on the code.
But, interestingly, that number is
4096 - 231so I’d be looking for the number 4096 somewhere in the code base.And I’m not sure I agree totally with your comment:
I suspect it started as an (overflowing)
int, got cast to a string, then had0xprefixed before being passed toInt64.Parse()or something similar.Why you would take a base-10 number and prefix it with
0xis a bit of a mystery.But, given that the exception should provide you with a line number, it should be possible to track back from there to find the errant operation.