Ibrahim Ibrahim - 2 months ago 68
C# Question

Get current ip-address Xamarin.Forms ( Cross Platform)

How get current ip-address for Xamarin.Forms ( Cross Platform) ? WifiManager I can't use and can't WifiManager include?

Answer
public string MyIp;

foreach (IPAddress adress in Dns.GetHostAddresses(Dns.GetHostName()))
{
    MyIp = "IP Adress: " + adress.ToString();
    SettingsTab.IP_Adress = MyIp;
    break;
}