Comment résoudre un nom de domaine en adresse IP avec .NET/C# ?
-
08-06-2019 - |
Question
Comment résoudre un nom de domaine en adresse IP avec .NET/C# ?
La solution
using System.Net;
foreach (IPAddress address in Dns.GetHostAddresses("www.google.com"))
{
Console.WriteLine(address.ToString());
}
Autres conseils
Essayez d'utiliser le System.Net.Dns classe
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow