how can we get ip address, subnet mask , default gateway and dns server by c# code?
15 Nov 2006
please tell me how can we get ipaddress, subnet mask, default gateway and dns server by c# code?
i have got a code with:
ManagementClass objMC = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection objMOC = objMC.GetInstances();
string ipaddresses = (string) objMO["IPAddress"];
string subnets = (string) objMO["IPSubnet"];
string gateways = (string) objMO["DefaultIPGateway"];
but system.management namespace is working in windows 2000 operating system only ( am i right?) , it is giving error in XP.
please anybody give me the code .
thankzz in advanse
No responses found. Be the first to respond and make money from
revenue sharing program
This thread is locked for new responses. Please post your comments and questions as a
If required, refer to the URL of this page in your
Urgent plz ..
Return to Discussion Forum
Post New Message
Is there any expert to solve this?
what is difference between String and string(data type) in c#?
what is a resource file...
Horizontal Scroll Bar for a listview control
Last 7 Days
R.Jaya kumar ...
Awards & Gifts
Articles Rss Feeds
Forum Rss Feeds
Talk to Webmaster Tony John
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India