Get IP address from a windows forms application
using System.Net; IPHostEntry he = Dns.GetHostByName(Dns.GetHostName()); Text = he.AddressList[0].ToString(); // returns IP address
Well, this will return multiple IP addresses if you have multiple IPs (multiple ethernet cards etc.)
No related posts.
Categories: C#, Code Snippets, DOTNET
Recent Comments