DNS Name Resolution : DNS « Network « C# / C Sharp






DNS Name Resolution

 
using System;
using System.Net;

public class DNSNameResolution
{
  [STAThread]
  static void Main(string[] args)
  {
    IPHostEntry MyHost = Dns.Resolve(args[0]);

    foreach (IPAddress MyIP in MyHost.AddressList)
    {
      Console.WriteLine(MyIP.Address);
    }
  }
}

           
         
  








Related examples in the same category

1.DNS Reverse Lookup and Lookup
2.DNS Get Host By NameDNS Get Host By Name
3.Find DNS Servers
4.Get Resolve Info:DNSGet Resolve Info:DNS
5.Get DNS Host InfoGet DNS Host Info
6.Get DNS Address Info
7.DNS Address ResolverDNS Address Resolver
8.Find DNS Servers from Registry
9.Get Dns Server