title: c# Abstract Class implementing an Interface
body: <p>I've seen the following code layout reading forums and other blog posts and adapted in order to ask a few questions. </p>
  
  <pre><code>public interface IService&lt;T&gt;
  {
      int Add(T entity);
      void Update(T entity);
  }
  
  public abstract class ServiceBase&lt;T&gt; : IService&lt;T&gt;
  {
      public int Add(T entity) { ... }
      public void Update(T entity) { ... }
  }
  
  public interface ICarService : IService&lt;Car&gt;
  {
  }
  
  public class SomeBaseClass : ServiceBase&lt;Car&gt;, ICarService
  {
      public int Add(Car entity);
      public void Update(Car entity);
  }
  </code></pre>
  
  <p>What I don't understand is the benefit of having the abstract class implmenting the interface. To me it just feels a bit repetitive and I cannot understand the benefit of having an abstract class implementing the interface.</p>
  
  <ol>
  <li>Why doesn't the abstract class <code>ServiceBase&lt;T&gt;</code> just define as is without the need to inherit the IService interface? Is this doubling up the code?</li>
  <li>Why must the <code>SomeBaseClass</code> also implment the <code>ICarService</code>? Shouldn't the ServiceBase be sufficient?</li>
  </ol>