I want to get client subnet mask using c#.
How can I get it?
First of all, check NetworkInterface
class first. There are a lot of information in it. And these articles will be helpful for you:
It's impossible to know what subnet mask client's network is using (if we are talking about D and E class IP addresses).
My assumption is that by "client" you mean a remote computer connected to your server. Otherwise see @Soner Gönül answer.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.