title: Passing implementations by ref: cannot convert from 'Foo' to 'ref IFoo'
body: <p>Can someone explain to me why this is incorrect in C#:</p>
  
  <pre><code>namespace NamespaceA
  {
      public class ClassA
      {
          public interface IInterfaceA
          {
              String Property
              {
                  set;
              }
          }
      }
  }
  
  namespace NamespaceB
  {
      public class ClassB
      {
          public class ImpA: NamespaceA.ClassA.IInterfaceA
          {
              private String mProperty;
              public String Property{ set{ mProperty = value; } }
          }
          public ClassB()
          {
              ImpA aImpA = new ImpA();
              foo(ref aImpA);
          }
  
          private void foo(ref NamespaceA.ClassA.IInterfaceA aIInterfaceA)
          {
              aIInterfaceA.Property = "SomeValue";
          }
      }
  }
  </code></pre>
  
  <p>This will produce a compile error of:</p>
  
  <blockquote>
    <p>Error Argument 1: cannot convert from 'NamespaceB.ClassB.ImpA' to 'ref NamespaceA.ClassA.IInterfaceA'  </p>
  </blockquote>
  
  <p>It seems perfectly reasonable to want to modify the interface properties and call the interface functions from <code>foo()</code>.  If you remove the <code>ref</code> keyword, it compiles, but the changes you make in <code>foo()</code> are lost...</p>