Take a look at the following link:
How To Get IP Address Of A Machine[
^] also, take a look at the comments, better way to get the IP is:
System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].GetIPProperties().UnicastAddresses[0].Address
Also,
Local IP[
^]