Why this function must be static?
<pre><code>public void AppendText(this RichTextBox box, string text, Color color)
{
    box.SelectionStart = box.TextLength;
    box.SelectionLength = 0;

    box.SelectionColor = color;
    box.AppendText(text);
    box.SelectionColor = box.ForeColor;
} 
</code></pre>

<p>It was <code>public static void</code></p>

<p>But then i had an error on this line in my Form1: </p>

<pre><code>public partial class Form1 : Form
</code></pre>

<p>The error is on the Form1 say:</p>

<blockquote>
  <p>Error Extension method must be defined in a non-generic static class</p>
</blockquote>

<p>If i remove the static from the function im getting error on the AppendText say:</p>

<blockquote>
  <p>Error Extension method must be static</p>
</blockquote>

<p>How do i work with that ?</p>
