110,584
社区成员
发帖
与我相关
我的任务
分享
for (int i = 0; i < AppConfig.MyTcpClient.Count; i++ )
{
TcpClient c = AppConfig.MyTcpClient[i];
if (c == null || c.Connected == false)
{
AppConfig.MyTcpClient.Remove(c);
}
else
{
User u = new User();
u.name = c.Client.RemoteEndPoint.ToString();
u.MyTcpClient = c;
AppConfig.MainFrom.combobox.InvokeIfNeeded((x) => AppConfig.MainFrom.combobox.Items.Add(x), u);
}
}