I would like to deepen my understanding of data types and want to know how I can determine how big a data type is. I'm hoping the journey to the answer uncovers other unknowns.
I know that in .NET, a byte is an 8-bit unsigned integer, but only because I've read about it. If I have a very simple console app like the following:
static void Main(string[] args)
{
byte b = 1;
}
How can I tell in Visual Studio, how big the data structure of 'b' is? I see that there are some Memory diagnostic windows but it only says that they're unable to evaluate the expression when I step over the assignment of b. I have the Disassembly window open and can see the mov op...
mov dword ptr [ebp-40h],1
... but not sure what the information means. I'm thinking that dword is hinting at the size and perhaps ptr ebp-40h is pointing to an address. Is there a way I can see all of the addresses in Visual Studio and perhaps glean the size by looking at the range?
I know these are tough questions to answer in a short forum like this but thanks for any help.