TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
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! :-)
Reply
Answers (
2
)
Is it better to have multiple design pattern in one app?
How to use service(BLL) in Form(windowsForm) With DI