When I need static class and when just private constructor?
Been reading MSDN, they mention that private constructors might be needed
if a class has only static members etc, like the Math class. But the Math
class is actually a static class. Also they mention "or when a method is
used to obtain an instance of class" - I can imagine how it works but can
you give me an example?
No comments:
Post a Comment