title: Why Invoke is needed?
body: <p>I kinda do understand point of threads and invokes, but not so great. I'm having server/client application made from tutorial. Now I'm having 2 functions. In Disconnect function I need to have Invoke but in Received function I don't. </p>
  
  <p>Why is that (problem is lstClient) ? </p>
  
  <p>And if I have Invoke in Received function then Invoke is just looping for some reason, why?</p>
  
  <pre><code>void client_Disconnected(Client sender)
  {
      Invoke((MethodInvoker)delegate
      {
          for (int i = 0; i &lt; lstClient.Items.Count; i++)
          {
              Client client = lstClient.Items[i].Tag as Client;
              if(client.ID == sender.ID)
              {
                  lb_ID.Items.RemoveAt(i); lb_ip.Items.RemoveAt(i); lb_users.Items.RemoveAt(i);
                  lstClient.Items.RemoveAt(i);
                  break;
              }
          }
      });
  }
  
  void client_Received(Client sender, byte[] data)
  {
      /*Invoke((MethodInvoker)delegate
      {*/
          for (int i = 0; i &lt; lstClient.Items.Count; i++)
          {
              Client client = lstClient.Items[i].Tag as Client;
              if (client.ID == sender.ID)
              {
                  if (Encoding.Default.GetString(data) == "end") 
                  {
                      client_Disconnected(client); 
                      break;
                  }
                  lstClient.Items[i].SubItems[2].Text = Encoding.Default.GetString(data);
                  lstClient.Items[i].SubItems[3].Text = DateTime.Now.ToString() ;
                  break;
              }
          }
      //});
  }
  </code></pre>