views:

23

answers:

0

Does the Visual Studio 2008 debugger implicitly cast all smaller data types to int? I have a function with the following signature:

public int DoSomething(sbyte value) { ... }

When pass in -127 and I look at the value argument the Visual Studio debugger (e.g. Watch window) shows me that it has the value 0xFFFFFF81. This is correct except for the fact that sbyte is only 8 bits wide; I would expect the debugger to show me that it is 0x81.