GetHostEntry
accepts an IPAddress
object, so you can specify an IP address as a byte array:
using System;
using System.Net;
using System.Threading;
using System.IO;
using System.Text;
class ThreadTest
{
static void Main()
{
IPAddress address = new IPAddress(new byte[] { 199, 181, 132, 250 });
IPHostEntry entry = Dns.GetHostEntry(address);
Console.WriteLine(entry.HostName);
}
}
The output:
tienda.espndeportes.com
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |