为什么循环停止, on proov = 1
,但我让它循环到 10 点?它应该在每轮中添加 +1,但程序在 1 处停止。
Dim proov As Integer
proov = 0
Dim myClientMachineAddressList = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName())
Do
Dim myClientMachineIP = myClientMachineAddressList.AddressList(proov)
If myClientMachineIP.AddressFamily = Sockets.AddressFamily.InterNetwork Then
Label2.Text = myClientMachineIP.ToString()
Else
TextBox2.Text = "IP does not equal to IPv4"
End If
Thread.Sleep(1000)
proov = proov + 1
TextBox3.Text = proov.ToString()
Loop Until proov = 10