title: Calling a function in the main Form from another Class in C#
body: <p>how I can call a function located in the Form class from another class?</p>
  
  <p>this is my code.I want call <code>get_data(data)</code> in <code>prog</code> class?</p>
  
  <p>thanks.</p>
  
  <pre><code>public partial class Form1 : Form
  {
      get_data(int mydata)
      {
          //code
      }
  
      //code
      prog var1=new prog();
      var1.start_data();
  }
  
  
  
  public class prog
  {
      public void start_data()
      {
          Thread ct=new Thread(do);
          ct.start();
      }
  
      private void do()
      {
          int data=40;
          get_data(data);  ///?????????????this is wrog
      }
  }
  </code></pre>