title: Inheritance and Interface segregation principle
body: <p>Does inheritance from a class with unused methods violates the interface segregation principle?</p>
  
  <p>For example:</p>
  
  <pre><code>abstract class Base
  {
      public void Receive(int n)
      {
          // . . . (some important work)
  
          OnMsg(n.ToString());
      }
  
      protected abstract void OnMsg(string msg);
  }
  
  class Concrete : Base
  {
      protected override void OnMsg(string msg)
      {
          Console.WriteLine("Msg: " + msg);
      }
  }
  </code></pre>
  
  <p><code>Concrete</code> depends on method <code>Base.Receive(int n)</code>, but it never uses it.</p>
  
  <p><strong>UPD</strong></p>
  
  <p>Definition I use:</p>
  
  <blockquote>
    <p>ISP states that no client should be forced to depend on methods it
    does not use.</p>
  </blockquote>