How to get subnet mask using .net?
First of all, check NetworkInterface
class first. There are a lot of information in it. And these articles will be helpful for you:
IP Address Calculations with C# (Subnetmasks, Networks, …)
Get Subnet Mask
Finding subnet mask from IP4 address using c#