/ Published in: C#
Expand |
Embed | Plain Text
private string GetMyIP() { IPHostEntry host = Dns.GetHostEntry(Dns.GetHostName()); foreach (IPAddress ip in host.AddressList) { if (ip.AddressFamily == AddressFamily.InterNetwork) { return ip.ToString(); } } return null; }
You need to login to post a comment.
