Creating an instance of a class in its static constructor - why is it allowed?
<p>Another question on SO inspired me to try this code in C#:</p>

<pre><code>class Program
{
    static Program() 
    {
        new Program().Run();
    }

    static void Main(string[] args) { }

    void Run()
    {
        System.Console.WriteLine("Running");
    }
}
</code></pre>

<p>This prints "Running" when run.</p>

<p>I actually expected the compiler to complain about this. After all, if the class has not yet been initialized by the static constructor; how can we be sure that it is valid to call methods on it ? </p>

<p>So why does the compiler not restrict us from doing this ? Is there any important usage scenarios for this ? </p>

<h1>Edit</h1>

<p>I am aware of the Singleton pattern; the point in question is why I can call a method on the instance before my static constructor finishes. So far JaredPar's answer has some good reasoning about this.</p>
