Mercurial > hg > Database > Christie-sharp
view Test/RewritingTest/IPAddress.cs @ 61:1a42115e51bb
fix
author | KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 28 Jan 2022 23:15:05 +0900 |
parents | |
children |
line wrap: on
line source
using System; using System.Net; namespace get_local_ip_address { class Program { static void Main(string[] args) { String strHostName = string.Empty; IPHostEntry ipEntry = Dns.GetHostEntry(Dns.GetHostName()); IPAddress[] addr = ipEntry.AddressList; for (int i = 0; i < addr.Length; i++) { Console.WriteLine("IP Address {0}: {1} ", i, addr[i].ToString()); } } } }