I can use System.Net.IPAddress to represent a single IP Address, but what can I use to represent an entire subnet, including the network address and the subnet mask?
2 Answers
I believe you can use the System.Net.IPAddress to also represent a subnet mask. It's of the same form, and the only real operation you need to do w/ it is a bitmask based on the bytes of the subnet address.
System.Net.IPAddress i = System.Net.IPAddress.TryParse("10.10.1.1"); Byte[] b = i.GetAddressBytes(); 1 Comment
Simon
apologies - my question didn't match the title. I've fixed the title.