This is my program to display the ip address of a system.
IPHostEntry ip = Dns.GetHostEntry(Dns.GetHostName());
IPAddress[] IPaddr = ip.AddressList;
for (int i = 0; i < IPaddr.Length; i++)
{
Console.WriteLine("IP Address {0}: {1} ", i, IPaddr[i].ToString());
}
This displays the below output:
IP Address 0: fe80::90da:c637:d34a:c8a3%2
IP Address 1: 10.0.2.6
Why does this display two values? Isn't the second one the real ip address?