views:

67

answers:

1

Here is a list of blittable types. It contains Int32 and Int64. But I don't see just plain "int" on the list. How does C# treat the plain "int" type? Does it just get replaced with Int32 or Int64 depending on the system? Or is there a subtle difference? Will using "int" ever cause a performance hit for marshalling?

+2  A: 

int is an alias for Int32. So no, there won't be a performance hit when using one vs. the other.

Jason Punyon
It is IntPtr that has different size depending on architecture.
Anton Tykhyy