tags:

views:

457

answers:

0

Possible Duplicate:
Assuming 32bit ints

Given the following c# code,

int testInt = 0;
Int64 testInt64 = 0;

Console.WriteLine("Size of IntPtr: {0}; testInt: {1}; testInt64: {2}", IntPtr.Size, sizeof(int), sizeof(Int64));

On a 64 bit machine I get the following output: Size of IntPtr: 8; testInt: 4; testInt64: 8

Will sizeof(testInt) ever be 8? In other words, VS2010 compiles a c# managed integer as 4 bytes, even on a 64 bit machine. Does anyone know if/when the time will come that a standard "int" in C# will be 64 bits? If it's not already that way with a 64 bit program compiled with a 64 bit compiler running on a 64 bit OS...when would it be?