title: Making a superclass have a static variable that's different for each subclass in c#
body: <p><em>Without any code in the subclasses</em>, I'd like an abstract class to have a different copy of a static variable for each subclass. In C#</p>
  
  <pre><code>abstract class ClassA
  {
      static string theValue;
  
      // just to demonstrate
      public string GetValue()
      {
          return theValue;
      }
      ...
  }
  class ClassB : ClassA { }
  class ClassC : ClassA { }
  </code></pre>
  
  <p>and (for example):</p>
  
  <pre><code>(new ClassB()).GetValue(); // returns "Banana"
  (new ClassC()).GetValue(); // returns "Coconut"
  </code></pre>
  
  <p>My current solution is this:</p>
  
  <pre><code>abstract class ClassA
  {
      static Dictionary&lt;Type, string&gt; theValue;
      public string GetValue()
      {
          return theValue[this.GetType()];
      }
      ...
  }
  </code></pre>
  
  <p>While this works fine, I'm wondering if there's a more elegant or built-in way of doing this?</p>
  
  <p><em>This is similar to <a href="https://stackoverflow.com/questions/1448092/" title="Can I have different copies of a static variable for each different type of inheriting class">Can I have different copies of a static variable for each different type of inheriting class</a>, but I have no control over the subclasses</em></p>