Is System.Int32 any slower than using int?

Possible Duplicate:
C#, int or Int32? Should I care?

Couple of questions on System.Int32:

  • Is there any specific technical reason why sizeof(System.Int32) is not allowed?
  • How fast or slow is System.Int32 in comparison to int type?
  • Calling System.Runtime.InteropServices.Marshal.SizeOf on a variable of type System.Int32 results in 4; how does this work? Would the size of this class be exactly same as that of int internally?

  • Effectivly there is no difference.

    int == Int32 .

    The former is implicitly 32 bits, while Int32 spells it out, similarly Int64 and Int16 (long and short respectivly) do the same.

    链接地址: http://www.djcxy.com/p/21042.html

    上一篇: Java和C#中的int和Integer有什么区别?

    下一篇: System.Int32比使用int慢吗?