C# Programmation Réseau: Résolution de nom de domaine

Author:

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);
    }
  }
}

           
       

Leave a Reply

Your email address will not be published. Required fields are marked *