compare two ip with C#

后端 未结 6 1300
夕颜
夕颜 2021-01-08 01:31

How I can compare two IP address?

string ip1 = \"123.123.123.123\";
string ip2 = \"124.124.124.124\";

I need some like this:



        
6条回答
  •  执笔经年
    2021-01-08 01:41

    You can use this class to compare IpAddress :

    http://www.codeproject.com/Articles/26550/Extending-the-IPAddress-object-to-allow-relative-c

提交回复
热议问题