Skip to main content

All Questions

22 votes
4 answers
5k views

Constructing an object: should I expose or hide parameters passed to the constructor?

I've a habit I just mechanically do without even thinking too much about it. Whenever a constructor is waiting for some parameters, I consider this a public information that should be available by ...
Jérôme MEVEL's user avatar
33 votes
3 answers
19k views

Optional parameters or overloaded constructors

I am implementing a DelegateCommand, and when I was about to implement the constructor(s), I came up with the following two design choices: 1: Having multiple overloaded constructors public ...
user avatar
3 votes
4 answers
875 views

Giving a class many constructors and assigning via them as many properties as possible

I have written a class which represents a SQLite Trigger. public SQLiteTrigger(string Name, string On, TriggerStartType StartType, ...
SmallestUncomputableNumber's user avatar