更新时间:2023-11-14 09:55:16
工作代码:
IPAddress.Parse(host).GetAddressBytes(3)
GetAddressBytes(3)
中的 3
是 octet
,所以如果你有 192.168.1.130
示例 IP v.4 地址,如果您将 3
更改为
Where 3
in GetAddressBytes(3)
is the octet
, so if you have 192.168.1.130
as an example IP v.4 address, if you changed 3
to
0
- 192
1
- 168
2
- 1
3
- 130