线程间操作无效: 从不是创建控件“xxxxxxxx”的线程访问它。

方法一:

Control.CheckForIllegalCrossThreadCalls = false;

方法二:(推荐)

this.Invoke(new MethodInvoker(() =>
{
lstServer.Items.Add("Client:" + clientep.Address + "(" + clientep.Port + ")");
}));

原文地址:https://www.cnblogs.com/systemnet123/p/3237738.html