.NET Equivalant for INET_NTOA and INET_ATON

前端 未结 5 934
暖寄归人
暖寄归人 2021-01-25 05:14

Any C#/.Net equivalent methods, or managed code examples for INET_NTOA and INET_ATON?

5条回答
  •  悲哀的现实
    2021-01-25 05:42

    Just to clarify, you're looking to parse a string representation of an IP Address, to an IPAddress object?

    (That's my understanding of this article explaining INET_NTOA)

    In that case ,it's System.Net.IPAddress.Parse("127.0.0.1"), and you can use the .ToString() off an IPAddress to get the string rep back out.

提交回复
热议问题