title: Using interfaces on abstract classes in C#
body: <p>I'm learning C# coming from C++ and have run into a wall.</p>
  
  <p>I have an abstract class AbstractWidget, an interface IDoesCoolThings, and a class which derives from AbstractWidget called RealWidget:</p>
  
  <pre><code>public interface IDoesCoolThings
  {
      void DoCool();
  }
  
  public abstract class AbstractWidget : IDoesCoolThings
  {
      void IDoesCoolThings.DoCool()
      {
          Console.Write("I did something cool.");
      }
  }
  
  public class RealWidget : AbstractWidget
  {
  
  }
  </code></pre>
  
  <p>When I instantiate a RealWidget object and call DoCool() on it, the compiler gives me an error saying </p>
  
  <blockquote>
    <p>'RealWidget' does not contain a
    definition for 'DoCool'</p>
  </blockquote>
  
  <p>I can cast RealWidget object to an IDoesCoolThings and then the call will work, but that seems unnecessary and I also lose polymorphism (AbstractWidget.DoCool() will always be called even if i define RealWidget.DoCool()).</p>
  
  <p>I imagine the solution is simple, but I've tried a variety of things and for the life of me can't figure this one out.</p>