How to Get Machine IP Address

Sometimes we need to get the IP Address of the current PC. Under a Event we can get the IP address Easily by using the Code:

string myHost = System.Net.Dns.GetHostName();
            string myIP = System.Net.Dns.GetHostEntry(myHost).AddressList[1].ToString();
            MessageBox.Show("My PC Name : "+myHost + "\nMy IP Address : " + myIP);

Popular posts from this blog

mvc razor textboxfor change event change another textboxfor value

WPF Crystal Report Viewer Using SAP

ASP.NET MVC razor SAP Crystal report