title: C# Implement Interface and inheritance
body: <p>I'm trying to implment a property interface with a class inherit the declare one. Maybe the example is more easy to understand.</p>
  
  <p>MyClassA is OK, but MyClassB has a compile error 'Test.MyClassB' does not implement interface member 'Test.IMyInterface.PropA'. 
  Any Idea how I can do this?</p>
  
  <p>/****** EDITED CODE ******/</p>
  
  <pre><code>public class BaseClass
  {
      public int PropA { get; set; }
  }
  
  public class InheritClass : BaseClass
  {
      public int PropB { get; set; }
  }
  
  public interface IMyInterface
  {
      BaseClass PropClass { get; set; }
  }
  
  
  public class MyClassA : IMyInterface
  {
  
      public BaseClass PropClass { get; set; }
  }
  
  public class MyClassB : IMyInterface
  {
  
      public InheritClass PropClass { get; set; }
  }
  </code></pre>