Does the Visual Studio debugger implicitly cast smaller types to int?
Posted
by emddudley
on Stack Overflow
See other posts from Stack Overflow
or by emddudley
Published on 2010-05-28T15:44:27Z
Indexed on
2010/05/28
15:52 UTC
Read the original article
Hit count: 185
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.
© Stack Overflow or respective owner