开发者

Does the Visual Studio debugger implicitly cast smaller types to int?

开发者 https://www.devze.com 2023-01-01 04:43 出处:网络
Does the Visual Studio 2008 debugger implicitly cast all smaller data types to int? I 开发者_StackOverflowhave a function with the following signature:

Does the Visual Studio 2008 debugger implicitly cast all smaller data types to int? I 开发者_StackOverflowhave 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消