IPAddress.MapToIPv6 for.NET 4? [duplicate]

2019-09-05 17:34发布

This question already has an answer here:

I want to convert my IPv4Address into IPv6Address and IPAddress.MapToIPv6 is only for .NET 4.5

Any solution for .NET 4 ?

标签: c# sockets ip
1条回答
贪生不怕死
2楼-- · 2019-09-05 18:08

An IPv4 address is translated to an IPv6 address by placing the 4 octets of the IPv4 address into the rightmost 4 octets of the IPv6 address.

Full method here

Ex: 192.168.25.234 -> C0A8:19EA

查看更多
登录 后发表回答