简体   繁体   English

为什么IPEndPoint将Int64和Int32作为参数?

[英]Why does IPEndPoint take an Int64 and an Int32 as parameters?

为什么不选择使用UInt32(用于IP)和UInt16(用于端口)?

Unsigned integers are not CLS compliant . 无符号整数不符合CLS As such many languages does not support them and they are avoided, whenever possible, in the .NET base class libraries (BCL). 因此, 许多语言不支持它们,并且尽可能避免在.NET基类库(BCL)中使用它们。

See also: Why are unsigned int's not CLS compliant? 另请参阅: 为什么unsigned int不符合CLS?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM