(1)在文本框中添加其他內容,原先內容不能刪除
textBox1.AppendText("dsada"+"\r\n");
textBox1.AppendText("123");
textBox1.AppendText(可以是定義的字符串變量,可以是帶有返回值的函數);
textBox4.Text = "正在監聽:" + "\r\n"
textBox4.Text = "正在監聽:" + "\r\n"
在label中換行用"\n"
textBox4.Text = textBox4.Text + "等待連接:" + "\n"
(3)將string轉換成IP
IPAddress ip = IPAddress.Parse(textBox1.Text);