title: c# Concrete override of generic class
body: <p>Here's the generic class I'm working with:</p>
  
  <pre><code> public interface IRepository&lt;T&gt; where T : EntityObject
  {
      RepositoryInstructionResult Add(T item);
      RepositoryInstructionResult Update(T item);
      RepositoryInstructionResult Delete(T item);
  }
  public class Repository&lt;T&gt; : IRepository&lt;T&gt; where T : EntityObject
  {
  
      RepositoryInstructionResult Add(T item)
      { //implementation}
      RepositoryInstructionResult Update(T item);
      { //implementation}
      RepositoryInstructionResult Delete(T item);
      { //implementation}
   }
  </code></pre>
  
  <p>Now I'm looking to occasionally alter the behavior of the methods when t : a specific type.
  Is something like the following possible? 
  This particular attempt gives an error (Error 5: Partial declarations of 'Repository' must have the same type parameter names in the same order).</p>
  
  <pre><code>public class Repository&lt;Bar&gt; //where Bar : EntityObject
  {
      RepositoryInstructionResult Add(Bar item)
      { //different implementation to Repository&lt;T&gt;.Add() }
      //other methods inherit from Repository&lt;T&gt;
   }
  </code></pre>