Dennis Trier

Dennis Trier

  • NA
  • 2
  • 865

Force subclass to implement private constructor

Nov 16 2018 9:06 AM
Hi All
 
I'm working on a school-project, and have made an abstract generic class to implement a singleton designpattern on my managerclasses.
 
However, when I give the GetInstance method it would be nice to force the subclass to hide it's constructor, as it should not be used.
 
How can I, in my superclass, force my subclass to implement the constructor as private?
 
Thanks! :-)
 
 

Answers (2)