0

In my C# console application, if I run this code:

IPHostEntry entry = Dns.GetHostEntry(IPAddress.Parse("192.168.6.54"));
if (entry != null)
{
    var x = entry.HostName;
    Console.WriteLine(x);
}

It prints HOME-PC

But If I run it in my Xamarin Forms application, on a physical Android device that is connected to the same network, x is 192.168.6.54. Why?

Drake
  • 2,679
  • 4
  • 45
  • 88
  • 2
    https://stackoverflow.com/questions/31849285/c-sharp-dns-gethostentry-doesnt-return-names-of-mobile-devices-connected-to-wif – Jason Jan 03 '19 at 23:24
  • Maybe this link will help you :https://stackoverflow.com/questions/44743311/c-sharp-dns-gethostentry-host-name-is-empty-or-not-correct – Leo Zhu Jan 07 '19 at 04:47

0 Answers0