如何在Windows应用程序中获取静态IP地址 [英] how to get Static IP adress in Windows application

查看:180
本文介绍了如何在Windows应用程序中获取静态IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何在Windows应用程序中获取静态IP地址.

谢谢与问候

O.Kranthi



how to get Static IP adress in Windows application.

Thanks & Regards

O.Kranthi

推荐答案

看看这篇文章查找IP地址信息 [^ ] .
Have a look at this article Finding IP Address Information[^].


ManagementObjectSearcher searcherNetwork =
       new ManagementObjectSearcher("root\\CIMV2",
       "SELECT * FROM Win32_NetworkAdapterConfiguration");

       foreach (ManagementObject queryObj in searcherNetwork.Get())
       {
           foreach (var prop in queryObj.Properties)
           {
               Console.WriteLine(string.Format("Name: {0} Value: {1}", prop.Name, prop.Value));
           }
       }




还是推荐:
http://stackoverflow.com/questions/890449/checking- static-or-dynamic-ip-address-in-c-net [




or reffer :
http://stackoverflow.com/questions/890449/checking-static-or-dynamic-ip-address-in-c-net[^]


看看这个

可能对您有帮助...

http://stackoverflow.com/questions/4899436/how-to-detect-static-ip-using-win-app-in-c [
Look at this

It may help you...

http://stackoverflow.com/questions/4899436/how-to-detect-static-ip-using-win-app-in-c[^]


这篇关于如何在Windows应用程序中获取静态IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆