title: Overriding a non-generic interface property with a generic one
body: <p>I have two interfaces like the following:</p>
  
  <pre><code>public interface IEntityViewModel&lt;T&gt; : IEntityViewModel where T : class, ICLEntity
  {
      new T Entity { get; set; }
  }
  
  public interface IEntityViewModel
  {        
      void LoadEntity(int primaryKey);
      bool? DialogResult { get; set; }
      ICLEntity Entity { get; set; }        
  }
  </code></pre>
  
  <p>When I implement a class, how can I ensure that the Entity property that appears on the class is the generic T?  Here's a sample class:</p>
  
  <pre><code>    public abstract class EntityConductor&lt;T&gt; : IEntityViewModel&lt;T&gt;
      where T : class, ICLEntity
      {
          public T Entity
          {
              get; set;
          }
      }
  </code></pre>
  
  <p>The compiler requires I add the IEntityViewModel implementation as well, for example:</p>
  
  <pre><code>ICLEntity IEntityViewModel.Entity
      {
          get
          {
              return ActiveItem.Entity;
          }
          set
          {
              ActiveItem.Entity = value as T;
          }
      }
  </code></pre>
  
  <p>but then I get two Entity properties in the class, which is not what I need.  If implementing the generic interface, I need the Entity property to be of type T, and if the non generic, to be of type ICLEntity.</p>
  
  <p>How can this be done?  Am I missing something simple?  I am using .NET 4.0, can covariance help me here?</p>
  
  <p>Thanks!</p>