以下の内容はhttps://kuxumarin.hatenablog.com/entry/2017/11/17/215616より取得しました。


C# で ホスト名からIPアドレスを名前解決してもらう

System.Net.Dns クラスを使います。

コード

 static void Main(string[] args)
        {
            var ipadress = System.Net.Dns.GetHostEntry("www.google.co.jp");
            Console.WriteLine($"DNS: {ipadress.HostName}");
            ipadress.AddressList.ToList().ForEach(address => Console.WriteLine(address));
        }

実行結果

https://lh3.googleusercontent.com/-cNAYr34TCLs/Wg7cWsry8rI/AAAAAAAAba8/a0qaF0lmMysmHprIL5iUINfbrrZIzt1-gCHMYCw/s0/cmd_2017-11-17_21-55-54.png




以上の内容はhttps://kuxumarin.hatenablog.com/entry/2017/11/17/215616より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14