title: Is this the correct way to use the invoke function?
body: <p>I want to constantly refresh my form to update the information displayed on the form. and do not want the program to crash. When I looked for answers on the Internet, when I got an answer that I had to use a function &quot;Control.Invoke&quot;. After that I wrote this code`</p>
  <pre><code>    private void Form1_Load(object sender, EventArgs e)
      {
              Thread Data = new Thread(RefreshData) { IsBackground = true };
              Data.Start();
      }
  
  
      void RefreshData()
      {
          while (true)
          {
              //...rewrite all data display on form
              this.Invoke((MethodInvoker)delegate { this.Refresh(); });
              Thread.Sleep(33);
          }
      }
  </code></pre>
  <p>Is this the correct way to use the invoke function?</p>