When to consider a singleton

Channel:
Subscribers:
5,410
Published on ● Video Link: https://www.youtube.com/watch?v=Ozx4Fvu3jwo



Duration: 4:24
694 views
7


You basically want a singleton when you are sure it is never appropriate to create more than one instance of the class per assembly, yet you require an instance for one reason or another (derivation, easy serialization, properly representing a model). And singletons can ease implementation as only the type needs to be defined and no instances need to be created manually.







Tags:
csharp
c#
visual studio
programming
tutorial
learn
c sharp
how to
.net
singleton