摘要:列舉IP位置
要如何利用Visual Basic列舉出目前電腦上所有網卡所設定或取得的IP位置呢?請參考看看下面程式碼
- Dim S As String = ""
- For Each item As Net.IPAddress In Net.Dns.GetHostByName(Net.Dns.GetHostName).AddressList
- S &= item.AddressFamily.ToString & " " & item.ToString & vbCrLf
- Next
- MessageBox.Show(S)