tags:

views:

78

answers:

1

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.

+1  A: 

See here: http://www.dreamincode.net/code/snippet3877.htm hope it helps

Nagg
I'm checking it out now
Ove
Perfect! Thanks :)
Ove