title: Uses for static generic classes?
body: <p>What are the key uses of a <strong>Static</strong> Generic Class in C#?  When should they be used?  What examples best illustrate their usage?</p>
  
  <p>e.g. </p>
  
  <pre><code>public static class Example&lt;T&gt;
  {
     public static ...
  }
  </code></pre>
  
  <p>Since you can't define extension methods in them they appear to be somewhat limited in their utility.  Web references on the topic are scarce so clearly there aren't a lot of people using them.  Here's a couple:-</p>
  
  <p><a href="http://ayende.com/Blog/archive/2005/10/05/StaticGenericClass.aspx" rel="noreferrer">http://ayende.com/Blog/archive/2005/10/05/StaticGenericClass.aspx</a></p>
  
  <p><a href="https://stackoverflow.com/questions/686630/static-generic-class-as-dictionary">Static Generic Class as Dictionary</a></p>
  
  <hr>
  
  <p><strong>Summary of Answers Given</strong></p>
  
  <p>The key issues appear to be "What's the difference between a <em>static generic class with static methods</em> and a <em>non-generic static class with static generic members</em>?"</p>
  
  <p>The decision as to which to use appears to revolve around "Does the class need to store type-specific state internally?"</p>
  
  <p>If there is no need for type-specific internal storage then a static non-generic class with generic static methods appears to be preferable because the calling syntax is nicer and you can define extension methods within it.</p>