The System.Net namespace has the Dns class, which has some
static methods that can do what you need.
GetHostName retrieve the host name of the local computer, then
Resolve takes this host name and returns an IPHostEntry, whose
AddressList contains the IP address of the local computer.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.