uint x = uint.MaxValue - 100;
The above line causes visual studio to report "The operation overflows at compile time in checked mode"
I'm obviously missing something. Any ideas what?
uint x = uint.MaxValue - 100;
The above line causes visual studio to report "The operation overflows at compile time in checked mode"
I'm obviously missing something. Any ideas what?
It may be implicity converting the uint.MaxValue to signed because you are subtracting a constant which is implicity signed. Try:
uint x = uint.MaxValue - 100U;
Hi, this error is being reported by the C# frontend used by the VS refactoring tool. When you go ahead and compile it using the actual compiler the error disappears!