Singleton: Difference between revisions

Content deleted Content added
→‎{{header|C#}}: syntax highlighting corrected
Line 273:
 
=={{header|C#}}==
<lang C#>
Thread save singleton implementation.
To make it non thread safe remove lockObject and the lock() statement
 
<lang C#csharp>
// Usage: Singleton.Instance.SomeMethod()
class Singleton