Alex Rivera | Logout

Int32 vs. Int64 vs. Int in C#

Asked 2009-11-05T12:01:06.883
17

Possible Duplicate:
Assuming 32bit ints

So I read somewhere that int equals int32 in c#. Is it true also on 64-bit machines? Should I use int32 just to make sure no one at microsoft decides to change the size of int?

Edit
Report

1 Answer

7

On both 32-bit and 64-bit machines:

  • long is 64-bit, it's a synonym for System.Int64.
  • int is 32-bit, it's a synonym for System.Int32.
answered 2009-11-05T12:04:13.487

Your Answer