Anonymous user
Singleton: Difference between revisions
m
→{{header|C#}}: Formating
m (→{{header|PureBasic}}: update with alternative version) |
m (→{{header|C#}}: Formating) |
||
Line 272:
}</lang>
=={{header|C sharp|C#}}==
A thread safe singleton implementation.
To make it non-thread safe remove lockObject and the lock() statement.
<lang csharp>// Usage: Singleton.Instance.SomeMethod()
class Singleton
{
Line 296 ⟶ 295:
}
// The rest of the methods
}</lang>▼
▲</lang>
=={{header|Erlang}}==
|