我知道我“可以”使用序列化,但这会给传输增加很多额外的数据,因为这些传输可以跨VPN等传输,所以决定不使用纯.Net序列化,因为会增加额外的开销。
因此,在执行此过程时,最好:
.Net保证Int32始终为32位:
Int32值类型表示有符号的 负2147483648至 正2147483647。
和 int 只是 an alias 对于 System.Int32 类型Net中的其他值类型(byte、short、long等)也是如此。
int
System.Int32
Console.WriteLine(int.MaxValue); Console.WriteLine(sizeof(int));
在我的机器上运行,在64位Windows Server 2008下,目标为x64:
2147483647 4