Ron see previous comments in your other post about gaurentees in ECMA
335 about cctor execution. It fits wonderfully with the sigleton
pattern as the type initializer is only run once and will be before
any method is called (on a reference type).



On 7/9/07, Ron Young <[EMAIL PROTECTED]> wrote:
I just read this... http://www.yoda.arachsys.com/csharp/singleton.html
Third version

Wow, that looks like double check lock and he says its bad.

This sucks. I thought that was a pattern.

Ron
-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Miika Mäkinen
Sent: Monday, July 09, 2007 12:23 AM
To: [email protected]
Subject: [ADVANCED-DOTNET] C# Singleton

Hi guys,
Which singleton implementation do you normally use? I've been using number
five from http://www.yoda.arachsys.com/csharp/singleton.html but reading
http://msdn2.microsoft.com/en-us/library/ms954629.aspx I'm understanding
that a simpler implementation works just the same?

Cheers,
Miika

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com



--
Studying for the Turing test

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to