Differneces 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
20:53 UTC
Read the original article
Hit count: 221
c#
|programming
Hi,
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