Lets take a look at CTS memory allocation table for C# and C++;
Type equivalent in C++
int or long
Now from the table above it is clear that C# makes use of int as an alias for 32 bit unassigned integer and C++ makes use of int or long. But long in case of C# is 64 bit unassigned integer.
Now you might ask what does that make difference. Let's have a look at it by an example.
We will call beep() function from an unmanaged code with its required arguments.
VB6 prototype is;
Beep(dwFreq as Long, dwDuration as Long) as Boolean
Now if we write it in .net, we might pass arguments as ;
Beep(long dwFreq,long dwDuration)
Now in this case long for VB is 32 bit unassigned integer and long for C# is 64 bit unassigned integer. The function will never return any output because of expected type mismatch.
If you are having any doubts about types in your mind, it is always a good practice to make use qualified names from CTS.
Ref: .Net Gotchas