title: simple custom event
body: <p>I'm trying to learn custom events and I have tried to create one but seems like I have a problem </p>
  
  <p>I have created a Form, static class and custom event. What I'm trying to achieve is when I press button Form will call static class function and then func will from time to time rise an event to report current status. Form1 will listen if the event is raised and if it is, it will change Text of label1</p>
  
  <p>Here is what I have so far  </p>
  
  <pre><code>public partial class Form1 : Form
  {
      public EventHandler&lt;Progress&gt; progress; 
  
      public Form1()
      {
          InitializeComponent();
          progress += SetStatus;
      }
  
      private void SetStatus(object sender, Progress e)
      {
          label1.Text = e.Status;
      }
  
      private void button1_Click_1(object sender, EventArgs e)
      {
           TestClass.Func();
      }
  
   }
  </code></pre>
  
  <p>File 2</p>
  
  <pre><code>class TestClass
  {
      public static void Func()
      {
          //time consuming code
          Report status 
          // time consuming code
          report status
      }
  }
  
  public class Progress : EventArgs
  {
      public string Status { get; private set; }
  
      private Progress() {}
  
      public Progress(string status)
      {
          Status = status;
      }
  }
  </code></pre>
  
  <p>Now what I don't understand is, how can I rise an event from TestClass so Form1 can handle event and change label.Text</p>