Anonymous user
Singleton: Difference between revisions
→{{header|C#}}: syntax highlighting corrected
(→{{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
// Usage: Singleton.Instance.SomeMethod()
class Singleton
|