title: Generic classes with shared static fields in C#
body: <p>I have a generic class definition similar to this:</p>
  
  <pre><code>public sealed class MyClass&lt;TProperty,TOwner&gt;
  {
      ...
  }
  </code></pre>
  
  <p>Now I'd like any instances of <code>MyClass&lt;TProperty,TOwner&gt;</code> regardless of the types of TProperty or TOwner to share a Hashtable. I thought of creating an internal MyClassBase with a protected internal static field of type Hashtable and inherit from that. I really only want the definition of MyClass to have access to this hashtable.</p>
  
  <p>Is this a sound approach? I can't seal MyClassBase, so this probably could lead to opening a can of worms later on...</p>
  
  <p>Are there other approaches for this?</p>