GetAddressBytes()
类的IPAddress
方法返回的4字节数组的字节顺序是什么?
More on the GetAddressBytes method
是大还是小端?我需要在邮件正文中加入一些IP地址,这对我来说非常重要。
答案 0 :(得分:10)
网络字节顺序(=大端)。参见:
答案 1 :(得分:5)
Big-Endian:127.0.0.1
- > [127,0,0,1]
答案 2 :(得分:4)
如果您将其作为普通的虚线字符串,则与您阅读的地址相同。
IE中。 “127.0.0.1”将按顺序给你127,0,0,1。