この記事は移転します
ホスト名からIPアドレスを調べたい
using System.Net;
//解決したいホスト名
string HostName = "ホスト名";
//IPHostEntryオブジェクトを取得
IPHostEntry iphe = Dns.GetHostEntry(HostName);
//IPアドレスのリストを取得
IPAddress[] adList = iphe.AddressList;
//IPアドレスを列挙
for (int ip_cnt = 0; ip_cnt < adList.Length; ip_cnt++)
{
string LocalIpAddress = adList[ip_cnt].ToString();
Console.WriteLine(LocalIpAddress);
}