【问题标题】:IPAddress.GetAddressBytes() method - what byte order?IPAddress.GetAddressBytes() 方法 - 什么字节顺序?
【发布时间】:2010-11-27 08:01:32
【问题描述】:

IPAddress类的GetAddressBytes()方法返回的4字节数组的字节顺序是什么?

More on the GetAddressBytes method.

是大端还是小端?我需要在邮件正文中添加一些 IP 地址,所以这对我很重要。

【问题讨论】:

    标签: c# ip-address


    【解决方案1】:

    【讨论】:

    【解决方案2】:

    大端:127.0.0.1 -> [127, 0, 0, 1]

    【讨论】:

      【解决方案3】:

      如果您将其作为普通的点分字符串,则与您读取的地址相同。

      即。 “127.0.0.1”将按​​顺序为您提供 127、0、0、1。

      【讨论】:

        猜你喜欢
        • 2010-11-23
        • 2011-01-13
        • 1970-01-01
        • 1970-01-01
        • 2010-10-26
        • 1970-01-01
        • 1970-01-01
        • 2019-07-31
        • 1970-01-01
        相关资源
        最近更新 更多