title: Why is it possible to implement an interface method in base class?
body: <p>In my project I've found a strange situation which seems completely valid in C#, because I have no compilte-time errors. </p>
  
  <p>Simplified example looks like that:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  
  namespace Test
  {
  
      interface IFoo
      {
          void FooMethod();
      }
  
      class A
      {
          public void FooMethod()
          {
              Console.WriteLine("implementation");
          }
      }
  
      class B : A, IFoo
      {
      }
  
      class Program
      {
          static void Main(string[] args)
          {
              IFoo foo = new B();
              foo.FooMethod();
          }
      }
  }
  </code></pre>
  
  <p>Such code compiles. However, note that <code>A</code> is not <code>IFoo</code> and <code>B</code> doesn't implement <code>IFoo</code> methods. In my case, by accident (after refactoring), <code>A</code> has the method with the same signature. But why should <code>A</code> know how to implement the <code>FooMethod</code> of the <code>IFoo</code> interface? <code>A</code> even doesn't know that <code>IFoo</code> exist.</p>
  
  <p>For me having such design is dangerous. Because every time I implement some interface I should check if each method in this interface "interferes" with the base class methods.</p>
  
  <p>If this is "pure C# feature"? What is it called? Am I missing something?</p>