c# Singleton Pattern vs Static Property
<p>When I tried to use 2 different versions of the same class , they act actually the same.</p>

<p>I searched but can't find a satisfied answer for this question</p>

<p>What are the differences between Singleton and static property below 2 example, it is about initialization time ? and how can i observe differences  ?</p>

<p>Edit : I don't ask about differences static class and singleton. Both of them non static, only difference is, first one initialized in Instance property, second one initialized directly</p>

<pre><code>public sealed class Singleton
{
    private static Singleton instance;

    private Singleton()
    {
    }

    public static Singleton Instance
    {
        get
        {
            if (instance == null)
            {
                instance = new Singleton();
            }
            return instance;
        }
    }
}

public sealed class Singleton2
{
    private static Singleton2 instance = new Singleton2();

    private Singleton2()
    {
    }

    public static Singleton2 Instance
    {
        get
        {
            return instance;
        }
    }
}
</code></pre>