So it lead to MS method that does that.
how we can fix that ?
ArrayList CurrentAddressTable = new ArrayList();
NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface i in interfaces)
{
if (i.IsReceiveOnly == false && i.OperationalStatus == OperationalStatus.Up && i.SupportsMulticast == true)
{
IPInterfaceProperties i2 = i.GetIPProperties();
foreach (UnicastIPAddressInformation i3 in i2.UnicastAddresses)
{
if (!CurrentAddressTable.Contains(i3.Address) && !i3.Address.Equals(IPAddress.IPv6Loopback)) { CurrentAddressTable.Add(i3.Address); }
}
}
}