Как преобразовать «System.String» к типу «System.Net.IPAddress»?
Не удалось привести тип объекта "System.String" к типу "System.Net.IPAddress".
Dim ServerIP = "127.0.0.1"
Dim ServerPort As Integer = 50000
TextBoxServerIP.Text = ServerIP
TextBoxServerPort.Text = ServerPort
Dim Server As New TcpListener(ServerIP, ServerPort)
Server.Start()
Где ошибка?
Dim ServerIP = "127.0.0.1"
Dim address As IPAddress = IPAddress.Parse(ServerIP)
Dim ServerPort As Integer = 50000
TextBoxServerIP.Text = ServerIP
TextBoxServerPort.Text = ServerPort
Dim Server As New TcpListener(address, ServerPort)
Server.Start()