I am using Xamarin.Android and wrote the following code:
public TextView text;
text = FindViewById<TextView>(Resource.Id.viewIP);
foreach (IPAddress adress in Dns.GetHostAddresses(Dns.GetHostName()))
{
text.Text = "IP Adress: " + adress;
}
However, when I open the application it shuts down immediately. Am I using the correct way of getting the IP address' of the device?