Differences between static class and instance class with private constructor
Posted
by dotnetdev
on Stack Overflow
See other posts from Stack Overflow
or by dotnetdev
Published on 2010-04-01T20:50:25Z
Indexed on
2010/04/01
21:03 UTC
Read the original article
Hit count: 230
c#
Although a static class has only one instance and can't be instantiated, a class with a private constructor can't be instantiated (as the constructor can't be seen), so every time you call this class, this is the same one instance?
Factory classes always follow the last convention (instance class with private constructor). Why is this?
Thanks
© Stack Overflow or respective owner