≡ Menu




How to get Ip of Url in c#

Here is sample code  remember to add system.net namespace

IPHostEntry ip = Dns.GetHostByName (“www.yahoo.com”);
IPAddress [] IpA = ipE.AddressList;
for (int i = 0; i < IpA.Length; i++)
{
    Console.WriteLine (“IP Address {0}: {1} “, i, IpA[i].ToString ());
}

{ 0 comments… add one }

Leave a Comment