title: Why is it impossible to declare extension methods in a generic static class?
body: <p>I'd like to create a lot of extension methods for some generic class, e.g. for</p>
  
  <pre><code>public class SimpleLinkedList&lt;T&gt; where T:IComparable
  </code></pre>
  
  <p>And I've started creating methods like this:</p>
  
  <pre><code>public static class LinkedListExtensions
  {
      public static T[] ToArray&lt;T&gt;(this SimpleLinkedList&lt;T&gt; simpleLinkedList) where T:IComparable
      {
         //// code
      }
  }
  </code></pre>
  
  <p>But when I tried to make LinkedListExtensions class generic like this:</p>
  
  <pre><code>public static class LinkedListExtensions&lt;T&gt; where T:IComparable
  {
      public static T[] ToArray(this SimpleLinkedList&lt;T&gt; simpleLinkedList)
      {
           ////code
      }
  }
  </code></pre>
  
  <p>I get "Extension methods can only be declared in non-generic, non-nested static class".</p>
  
  <p>And I'm trying to guess where this restriction came from and have no ideas.</p>
  
  <p>EDIT: Still don't have clear vision of the problem. It seems like this was just not implemented for some reason.</p>