Singleton and multithreading

Hi!

I have a simple question: "Is the code below threadsafe "

public class MyType
{

...

private static readonly MyType p_instance;
public statict MyType Instance
{
get { return p_instance; }
}

static MyType()
{
p_instance = new MyType();
}

private MyType()
{
}

...

}


Answer this question

Singleton and multithreading