title: C# Design Regarding Static Classes and Inheritence
body: <p>I am designing a card game in C#. Each  card is an instance of the <code>Card</code> class that contains two properties: a unique ID for the card and a reference to a <code>CardData</code> object. The object of type <code>CardData</code> implements the methods regarding how the <code>Card</code> functions within the game rules. Many cards (ex. if there are multiple jack of clubs) can reference the same card data.</p>
  
  <pre><code>public class Card {
      public int id;
      public CardData card;
  }
  </code></pre>
  
  <p>My question is regarding how I should implement the <code>CardData</code> class. My first instinct was to design an abstract base class <code>CardData</code> with a bunch of  methods like <code>WhenPlayed()</code> and <code>WhenRemoved()</code>, and then have a subclass for each card that implements them. </p>
  
  <pre><code>public abstract class CardData () {
      public abstract void WhenPlayed();
      public abstract void WhenRemoved();
  }
  
  public class JackOfClubs : CardData () {
      public override void WhenPlayed()  { 
          Console.WriteLine( "You played a Jack of Clubs!" );
      }
      public override void WhenRemoved() {
          Console.WriteLine( "Bye for now" );
      }
  }
  </code></pre>
  
  <p>However, since I never want to actually instantiate a <code>JackOfClubs</code> object, but rather instantiate <code>Card</code>s and give them a reference to the <code>JackOfClubs</code> class, it would make sense to make the <code>CardData</code> class and all subclasses <code>static</code>. This creates a problem, because as far as I know static classes cannot inherit. </p>
  
  <p>Furthermore, I considered using an <code>interface</code> but I wanted the possibility of default methods. For instance, if 90% of my <code>CardData</code> objects implement <code>WhenRemoved()</code> as "Bye for now", it would be tiresome to retype that for each subclass. I could use a non abstract <code>CardData</code> class to achieve this, but not an interface.</p>
  
  <p>My question is what would be the best or correct approach to handling a class structure such as this, if there is one.</p>