Method is to get the systems Ip Address

protected string GetLocalIPAddress()
{

string IPAddress = string.Empty;
System.Net.

IPHostEntry host = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName());

foreach (System.Net.IPAddress ip in host.AddressList)
{

if (ip.AddressFamily.ToString() == "InterNetwork")
{
IPAddress = ip.ToString();
}
}

return IPAddress;
}

Ebook Download
View all
Learn
View all