sorry to make a mistake from ur video but real code never get underlined in visual studio its bad to talk about it sorry but real code is IPHostEntry iPHost; string localIp = ""; iPHost= Dns.GetHostEntry(Dns.GetHostName()); foreach (IPAddress ip in iPHost.AddressList) { if (ip.AddressFamily.ToString() == "InterNetwork") localIp = ip.ToString(); listBox1.Items.Add(localIp); thank you very much
sorry to make a mistake from ur video but real code never get underlined in visual studio its bad to talk about it sorry but real code is
IPHostEntry iPHost;
string localIp = "";
iPHost= Dns.GetHostEntry(Dns.GetHostName());
foreach (IPAddress ip in iPHost.AddressList)
{
if (ip.AddressFamily.ToString() == "InterNetwork")
localIp = ip.ToString();
listBox1.Items.Add(localIp);
thank you very much