<p>I would like to know what is the difference between initializing a static member inline as in:</p>

<pre><code>class Foo
{
    private static Bar bar_ = new Bar();
}
</code></pre>

<p>or initializing it inside the static constructor as in:</p>

<pre><code>class Foo
{
    static Foo()
    {
        bar_ = new Bar();
    }
    private static Bar bar_;
}
</code></pre>

In this case I don't believe there si any practical difference. If you need some logic in initializing the static variables - like if you would want to use different concrete types of an interface given different conditions - you would use the static constructor. Else, the inline initialization is fine in my book.
```
```
class Foo
{
    private static IBar _bar;

    static Foo()
    {
        if(something)
        {
            _bar = new BarA();
        }
        else
        {
            _bar = new BarB();
        }
    }
}
```
```