title: How to declare generic event for generic delegate in c#
body: <p>I have a user control which deals with fileupload. I have defined a delegate as follows</p>
  
  <pre><code>public delegate void FileUploadSuccess&lt;T&gt;(T value,FileUploadType F)
  </code></pre>
  
  <p>value can be a string as well as byte array. FileUploadType is an enum which tells which type of file was uploaded.</p>
  
  <p>Now I have declared a event in usercontrol to raise this.</p>
  
  <pre><code>public event FileUploadSuccess&lt;string&gt; successString;   //In case I want a file name
  
  public event FileUploadSuccess&lt;Byte[]&gt; successStringImage;  // In case I want a byte[] of uploaded image
  </code></pre>
  
  <p>What I wanted was a generic event </p>
  
  <pre><code>public event FileUploadSuccess&lt;T&gt; successString. 
  </code></pre>