title: How to correctly implement generic interfaces
body: <p>I have a little problem. 
  Below is a code sample. How can I have a variable like <code>testVar</code> that can take <code>ITest&lt;T&gt;</code>? Obviously I get an cast error.  Is there some way I can fully use the generic interface without casting?
  I tried to make <code>T</code> covariant <code>(out T)</code>, but that's not possible due to the <code>ResultEventArgs</code>.</p>
  
  <pre><code>using System;
  
  namespace InterfaceGenericFunApp
  {
      public class ResultEventArgs&lt;T&gt; : EventArgs
      {
          public T Result { get; set; }
      }
  
      public interface ITest&lt;T&gt;
      {
          event EventHandler&lt;ResultEventArgs&lt;T&gt;&gt; ResultReceived;
      }
  
      public class TestClass : ITest&lt;string&gt;
      {
          public event EventHandler&lt;ResultEventArgs&lt;string&gt;&gt; ResultReceived;
      }
  
      public class Program
      {
          private static ITest&lt;object&gt; testVar; 
  
          public static void Main(string[] args)
          {
              testVar = new TestClass();
          }
      }
  }
  </code></pre>