Click here to Skip to main content
15,169,508 members
Articles / Programming Languages / C#

Tagged as

Stats

58.6K views
16 bookmarked

Singletons in C#, Static Constructor vs Static Initialization

Rate me:
Please Sign up or sign in to vote.
4.50/5 (12 votes)
1 Jul 2010CPOL2 min read
In C#, you can implement a thread safe singleton where the complexity is hidden in the .NET Framework, you do not even need an if statement!

Views

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Mattia Baldinger
Software Developer
Switzerland Switzerland
No Biography provided

Comments and Discussions