Finding Ip Address
using System;
using System.Net;
class NetworkBasics
{
public static void Main(string[] args)
{
IPHostEntry hostname = Dns.GetHostByName("www.gmail.com");
IPAddress[] ip = hostname.AddressList; // Returns the list of IP Addresses that are associated with a host
Console.WriteLine(ip[0].ToString());
Console.ReadLine();
}
}
Output:
74.125.236.213