Iterate over IP addresses

Posted by user80003 on Stack Overflow See other posts from Stack Overflow or by user80003
Published on 2010-03-21T19:54:46Z Indexed on 2010/03/21 20:01 UTC
Read the original article Hit count: 267

Filed under:
|

Let's say I have two IP addresses (in .NET, the System.Net.IPAddress class). How can I iterate over all the IP addresses between two given addresses?

For example, let one address be 192.168.1.1 and the other 192.168.2.3. I want to somehow iterate over all the addresses in between and print them to the console.

Thank you.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#