Hi makenzi.exc,
Use the Dns class to get the IpAddress.
Refer below example.
Code
// Get the Name of HOST.
string hostName = System.Net.Dns.GetHostName();
// Get the IPAddress using GetHostEntry method.
System.Net.IPAddress[] iPAddresses = System.Net.Dns.GetHostEntry(hostName).AddressList;
string ipAddress = iPAddresses[iPAddresses.Length - 1].ToString();