Advertisement
Advertisement
string myHost = System.Net.Dns.GetHostName(); // Show the hostname  MessageBox.Show(myHost); // Get the IP from the host name 
string myIP = System.Net.Dns.GetHostEntry(myHost).AddressList[index].ToString(); // Show the IP  MessageBox.Show(myIP);

Advertisement
Advertisement

By Enrico

My greatest passion is technology. I am interested in multiple fields and I have a lot of experience in software design and development. I started professional development when I was 6 years. Today I am a strong full-stack .NET developer (C#, Xamarin, Azure)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.