FromIp contains '192.168.1.1'. I want to get the last number, but I can’t figure out what’s wrong here:
Dim str As String str = FromIP.Text.Substring(FromIP.Text.LastIndexOf('.'), FromIP.Text.Length).ToString() MessageBox.Show(FromIP.Text.Length)
Tested code:
But this refactored code will work better: