How to find IP Adress of a computer
Network programming in windows is possible with sockets . C# simplifies network programming through its namespaces like System.Net and System.Net.Sockets . The System.Net classes provide functionalities that is similar to Microsoft WinInet API.
The System.net namespace provides the information about IP Address . The following C# program shows how to find the IP Address of a host.
If you pass localhost in GetHostByName return the IP Address of local machine .