title: passing void to a generic class
body: <p>I'm trying to create a form that will animate something while processing a particular task (passed as a delegate to the constructor). It's working fine, but the problem I'm having is that I can't instantiate a copy of my generic class if the particular method that I want to perform has a return type of void.</p>
  
  <p>I understand that this is by design and all, but I'm wondering if there is a known workaround for situations like this.</p>
  
  <p>If it helps at all my windows form looks like so (trimmed for brevity):</p>
  
  <pre><code>public partial class operatingWindow&lt;T&gt; : Form
  {
      public delegate T Operation();
      private Operation m_Operation;
  
      private T m_ReturnValue;
      public T ValueReturned { get { return m_ReturnValue; } }
  
      public operatingWindow(Operation operation) { /*...*/ }
  }
  </code></pre>
  
  <p>And I call it like: </p>
  
  <pre><code>operatingWindow&lt;int&gt; processing = new operatingWindow&lt;int&gt;(new operatingWindow&lt;int&gt;.Operation(this.doStuff));
  processing.ShowDialog();
  
  // ... 
  private int doStuff()
  {
      Thread.Sleep(3000);
  
      return 0;
  }
  </code></pre>