static void f_WriteIpAddresses()
{
IPHostEntry host;
string localIP = "?";
host = Dns.GetHostEntry(Dns.GetHostName());
foreach (IPAddress ip in host.AddressList)
{
Console.Write(ip.ToString());
Console.Write(" - ");
}
}
static void Main(string[] args)
{
Console.WriteLine("Your IP Address:")
WriteIpAddresses();
Console.Write("[You can delete/modify address]");
string ip = Console.ReadLine();
}
I want to find all address and write on the line where user can delete until the right address or modify the line.
c:\>address.exe
Your IP Address:
192.168.1.13 - 10.10.2.15 [You can delete/modify address]