why can not across external form the inter of a thread

来源:互联网 发布:mysql 无需密码登录 编辑:程序博客网 时间:2024/05/01 16:11

 Thread thread = new Thread(new ParameterizedThreadStart(Receive));

thread.Start(textBox3);

private

{

 

{

mySock = Listener.AcceptSocket();

 

{

((

 

netStream.Read(messageByte, 0, messageByte.Length);

 

((TextBox

}

}

}

how can i solve it?

void Receive(object o)while (!control)if (mySock.Connected)TextBox)o).Text = "connected...";  //  it will accur a error byte[] messageByte = new byte[64];string readMessage = System.Text.Encoding.BigEndianUnicode.GetString(messageByte);)o).AppendText(readMessage);