title: Passing implemented templated types: cannot convert from implementation to interface
body: <p>Can someone explain to me why this is incorrect in C#:</p>
  
  <pre><code>namespace NamespaceA
  {
      public class ClassA&lt;T1&gt;
      {
          T1 mT1;
          public T1 Type1
          {
              get { return mT1; }
          }
      }
  
      public class IOForClassA
      {
          public interface ICanOutput
          {
              void OutputFunction();
          }
  
          public static void Output(ClassA&lt;ICanOutput&gt; aClassA_WithOutputCapabilities)
          {
              aClassA_WithOutputCapabilities.Type1.OutputFunction();
          }
      }
  }
  
  namespace NamespaceB
  {
      public class ClassB
      {
          public class OutputableClassA : NamespaceA.IOForClassA.ICanOutput
          {
              public void OutputFunction()
              {
              }
          }
          public ClassB()
          {
              NamespaceA.ClassA&lt;OutputableClassA&gt; aOutputableA = new NamespaceA.ClassA&lt;OutputableClassA&gt;();
              NamespaceA.IOForClassA.Output(aOutputableA);
          }
      }
  }
  </code></pre>
  
  <p>This will result in a compile error of:</p>
  
  <p>Argument 1: cannot convert from 'NamespaceA.ClassA"&lt;"NamespaceB.ClassB.OutputableClassA">" to NamespaceA.ClassA"&lt;"NamespaceA.IOForClassA.ICanOutput">"</p>
  
  <p>... but NamespaceB.ClassB.OutputableClassA implements NameSpaceA.IoForClassA.ICanOutput, so I don't see why this is a problem...</p>
  
  <p>I am trying to allow a user to create a ClassA of any type he/she wishes.  However, if they wish that ClassA to be "outputable" its templated type must implement a specific interface.</p>