All Questions
3 questions
3
votes
1
answer
1k
views
Handle Named constructors with factory pattern
In my current project I'm refactoring the code to get a DBAL. I have a class Entity that is the base class for all classes that model a database table. So there are several classes that inherit from ...
3
votes
5
answers
16k
views
Constructor overloading or allow null?
Which is the preferred design to use, one constructor that allows null, or two constructors where one throws an ArgumentNullException on null?
Two constructors with exception throwing
public class ...
7
votes
2
answers
876
views
Design pattern for too many ctor parameters within class hierarchy
Is there some design pattern for handling situation where class hierarchy constructors parameters force the most bottom classes to have too many parameters?
Ideally this would be in C++, if language ...