<p>I'm a fan of extension methods in C#, but haven't had any success adding an extension method to a static class, such as <code>Console</code>.</p>
<p>For example, if I want to add an extension to <code>Console</code>, called '<code>WriteBlueLine</code>', so that I can go:</p>
<pre><code>Console.WriteBlueLine(&quot;This text is blue&quot;);
</code></pre>
<p>I tried this by adding a local, public static method, with <code>Console</code> as a '<code>this</code>' parameter... but no dice!</p>
<pre><code>public static class Helpers {
    public static void WriteBlueLine(this Console c, string text)
    {
        Console.ForegroundColor = ConsoleColor.Blue;
        Console.WriteLine(text);
        Console.ResetColor();
    }
}
</code></pre>
<p>This didn't add a '<code>WriteBlueLine</code>' method to <code>Console</code>... am I doing it wrong? Or asking for the impossible?</p>

You can't add
static
methods to a type.  You can only add (pseudo-)instance methods to an instance of a type.
The point of the
```
this
```
modifier is to tell the C# compiler to pass the instance on the left-side of the
```
.
```
as the first parameter of the static/extension method.
In the case of adding static methods to a type, there is no instance to pass for the first parameter.