private void send(string str) { OutputThread oThread = new OutputThread(this.HostValue.Text, int.Parse(this.PortValue.Text), str); Thread t = new Thread(new ThreadStart(oThread.process)); t.Start(); }